developit / workerize

🏗️ Run a module in a Web Worker.
https://github.com/developit/workerize-loader
4.35k stars 91 forks source link

default export fails to build with create-react-app #12

Closed quentin-sommer closed 6 years ago

quentin-sommer commented 6 years ago

When importing workerize in a cra app the build fail with this message

> react-scripts build

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

Failed to minify the code from this file:

    ./node_modules/workerize/src/index.js:23

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

I was able to make it work using import workerize from 'workerize/dist/workerize.m.js'

developit commented 6 years ago

Whoops, the "module" entry is wrong.

developit commented 6 years ago

Fixed in 0.1.3!