loader worker-plugin/loader is not found by webpack
See original GitHub issueUsing worker-plugin version 4.0.2, and trying to use the worker-plugin/loader
syntax, I get the following error in Webpack:
ERROR in /home/steph/data/enlightware/game-creator/src/blocks/actions/music/music.ts
./src/blocks/actions/music/music.ts
[tsl] ERROR in /home/steph/data/enlightware/game-creator/src/blocks/actions/music/music.ts(18,29)
TS2307: Cannot find module 'worker-plugin/loader!./music.worklet'.
is the line:
import musicWorkletURL from 'worker-plugin/loader!./music.worklet';
The file music.ts
imports the worker music.worklet.ts
.
I am using Webpack 4.42 and Typescript 3.8.3 (both latest).
While my configuration files have nothing exotic IMHO, I am aware that this problem still is likely the result of a complex interaction between Webpack and Typescript, and I will produce a minimal test case as soon as possible. I still post the issue already in case someone else meets the same problem.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
worker-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Module not found error when adding worker-loader
I am working on my vue app and I am trying to add worker-loader. These are the stops I have followed. I added...
Read more >worker-plugin - npm
Automatically bundle & compile Web Workers within Webpack. Features. Automatically compiles modules loaded in Web Workers: const worker = new ...
Read more >Loading web workers using Webpack 5 · mmazzarolo.com
Web workers are restricted by a same-origin policy, so if your webpack assets are not being served from the same origin as your...
Read more >Aurelia Webpack with Typescript Module: Module not found
Hi. I followed the instruction for the Typescript WebWorker integration for Webpack here: GitHub - webpack-contrib/worker-loader: A webpack ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I know what is causing the crash, will try to reproduce so I can add a fix.
I’m still experiencing this crash issue. Using the webpack configuration and doing the direct import of worker file. I’m using latest 4.0.3.