Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

ES5 Compatibility #34

Closed
fabioberger opened this issue Oct 13, 2018 · 2 comments
Closed

ES5 Compatibility #34

fabioberger opened this issue Oct 13, 2018 · 2 comments

Comments

@fabioberger
Copy link

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.

@holgerd77
Copy link
Member

holgerd77 commented Oct 15, 2018

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.

@holgerd77
Copy link
Member

Solved by TypeScript release #55, will close.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants