Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Please publish ES5 compiled version of json-rpc-engine #3

Closed
sulliwane opened this issue Nov 22, 2017 · 2 comments
Closed

Please publish ES5 compiled version of json-rpc-engine #3

sulliwane opened this issue Nov 22, 2017 · 2 comments

Comments

@sulliwane
Copy link

Hello,

I'm using json-rpc-engine from a create-react-app, and when building an production minified JS bundle (npm run build), I get an error:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/json-rpc-engine/src/index.js:5 

Read more here: http://bit.ly/2tRViJ9

which says :

Some third-party packages don't compile their code to ES5 before publishing to npm. This often causes problems in the ecosystem because neither browsers (except for most modern versions) nor some tools currently support all ES6 features. We recommend to publish code on npm as ES5 at least for a few more years.

It would be nice to publish a ES5 compiled version of json-rpc-engine (issue related in metamask/mascara)

Many thanks!

@Gudahtt
Copy link
Member

Gudahtt commented Aug 14, 2019

Using exclusively ES5 libraries is no longer recommended by create-react-app, as of v2 I believe. They transpile their dependencies now instead.

As of Babel 7 compiling libraries to ES5 is no longer necessary to support applications that target ES5, because transpiling dependencies is now much easier than it was with Babel 6. See this blog post for more details.

@rekmarks
Copy link
Member

There may have been argument for this in 2017, but as of today, I don't believe that we have plans to continue shipping ES5 builds of any packages we maintain.

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

No branches or pull requests

3 participants