You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.
Downstream projects using RLP that try to target ES5 cannot use this library since it's published code is not compiled using Babel.
In the case of 0x, we are unable to minify our webpack bundle using UglifyJs since it only supports ES5. By publishing this library in ES6 syntax rather then compiling it to the lowest denominator, downstream projects are forced to either fork & compile to ES5, or use something else.
Please consider keeping your source code in ES6 syntax, but compiling it to ES5 before publishing the library to NPM.
The text was updated successfully, but these errors were encountered:
Hi @fabioberger, thanks for writing this up, this makes very much sense!
Implementation Notes
(Trivial) confirm if one is looking at current package.json state that the library is currently not using babel.
We have done this a couple of time lately (one can just do an organization-wide "babel" search), here is one example for inspiration for an implementation.
Preferred way is to have this build to a dist folder which is not included within git for consistency reasons but created before npm publication.
Between conclusion from other implementations though is that this field of topic creates different new challenges regarding the structure of repos and should be handled with some care, especially content of a potentially-distributed package should be pre-checked carefully.
In the case of this library there is probably the bin directory which should be taken an eye upon.
Hi there,
Downstream projects using RLP that try to target ES5 cannot use this library since it's published code is not compiled using Babel.
In the case of 0x, we are unable to minify our webpack bundle using UglifyJs since it only supports ES5. By publishing this library in ES6 syntax rather then compiling it to the lowest denominator, downstream projects are forced to either fork & compile to ES5, or use something else.
Please consider keeping your source code in ES6 syntax, but compiling it to ES5 before publishing the library to NPM.
The text was updated successfully, but these errors were encountered: