-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transpile to es5 to support older devices #50
Comments
I think that transpiling code is something that must be done by the end user in this case, since there is no way for us to know exactly which browsers/environments they are targeting. It's my opinion that it's better for all code on npm to use the latest language features, and then someone building a website can configure their build process to transpile accordingly... |
Usual babel setup only transpiles project's source code and doesn't touch node_modules. Most of the libraries target ES5 as a base case and sometimes they also provide additional target like esnext. |
Transpiling It seems like a bad approach that all newer browsers should pay the price of running older code, even on websites that aren't even supporting older browsers? |
I thought of something like this https://github.com/xobotyi/scrollbar-width/blob/master/package.json#L33 |
Let's provide a transpiled to es5 version of this lib. We can do it before publish on npm for example.
Currently this lib is not usable for devices not supporting some of es6+ syntax like async/await, Promise, const etc.
The text was updated successfully, but these errors were encountered: