gl-vis / regl-scatter2d

Fast and precise scatter plot
https://gl-vis.github.io/regl-scatter2d
MIT License
20 stars 5 forks source link

Failed to minify the code #13

Open oddball opened 6 years ago

oddball commented 6 years ago

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 commented 6 years ago

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.