Trying to load from strange function SyntaxError: Unexpected token <
bknill opened this issue · 1 comments
bknill commented
I'm really struggling with workers in a Create React App.
`import VoiceWorker from 'workerize-loader!./voice.worker.js'// eslint-disable-line import/no-webpack-loader-syntax
...
voiceWorker = VoiceWorker()
voiceWorker.start()
`
It's trying to find the worker here:
https://localhost:3000/course/function()%20%7Bvar%20w%20=%20new%20Worker(__webpack_require__.p%20+%20%22e9945ffae477ccb5331c.worker.js%22,%20%7B%20name:%20%22[hash].worker.js%22%20%7D)addMethods(w,%20methods)return%20w%7D
bknill commented
I'd been using this with the example code from worker-loader and that's where I was going wrong