Closed a-type closed 3 years ago
For people searching for a temporary solution: downgrading to 4.0.3 worked (no pun intended) for me
BTW, it seems it's also affecting Angular as well, the issue can be reproduced here https://github.com/angular/angular-cli/issues/19884
This should be fixed by #94.
I'm using this plugin with a Create-React-App based project (utilizing react-app-rewired to inject it into the Webpack plugin). So far that was working great.
I went to add use-cannon, however, and encountered a strange build error:
Ultimately I've narrowed it down to worker-plugin. If I run my app without
react-app-rewired
(i.e. not adding the plugin), use-cannon works fine.A minimal reproduction repo lives here. The error shows up when starting the project. You can switch the
npm start
script back toreact-scripts start
to see that it runs fine without worker-plugin.There's probably something specifically off about the way worker-plugin tries to operate on the worker that's already taken care of within the built bundle of use-cannon.
Possible solutions: