transcranial / keras-js

Run Keras models in the browser, with GPU support using WebGL
https://transcranial.github.io/keras-js
MIT License
4.96k stars 501 forks source link

Failed to Uglify using webpack #123

Open ghost opened 6 years ago

ghost commented 6 years ago

I have read the docs, and made sure that my webpack Uglify entry looks like this:

    new webpack.optimize.UglifyJsPlugin({
      compress: { warnings: false, unused: false, comparisions: false },
      output: { comments: false }
    }),

Still, here's the output I get if I try to make a build:

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

Failed to minify the bundle. Error: static/js/main.531ae0c8.js from UglifyJs
Unexpected token: name (Tensor) [static/js/main.531ae0c8.js:734,6]

Any idea what might be causing this?

If it helps, my project is based of create-react-app.

jkMey commented 6 years ago

According to http://bit.ly/2tRViJ9

It seems the author did not compile the code to ES5 before publishing it to npm.

ghost commented 6 years ago

So, should I contact the other lib?

jkMey commented 6 years ago

I'd suggest compiling it yourself.