Skip to content
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

Failed to minify the code #13

Open
oddball opened this issue Jul 5, 2018 · 1 comment
Open

Failed to minify the code #13

oddball opened this issue Jul 5, 2018 · 1 comment

Comments

@oddball
Copy link

oddball commented Jul 5, 2018

from my react project I had issues, when

$ npm run build
> react-scripts build

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

Failed to minify the code from this file:

 	./node_modules/regl-scatter2d/scatter.js

Does anyone know how to solve this?

@hyperknot
Copy link

Yes, this is an issue for any create-react-app based projects, and should be babelified on the project level, before releasing to npm.

The only workaround for this is to link the files from node_modules and have it required with a './something' like import, which would make them babelified via webpack.

But this is considered a bad practice to publish packages with un-babelified ES6 code.

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

No branches or pull requests

2 participants