You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will generate a main file that calls new Worker("<processed URL>", { type: "module" }), but a worker that calls importScripts() to load some-really-big-module-that-gets-its-own-chunk. This results in an error when the worker is loaded.
Bug report
What is the current behavior?
In a project with
experiments.outputModule = true
, the following code:will generate a main file that calls
new Worker("<processed URL>", { type: "module" })
, but a worker that callsimportScripts()
to loadsome-really-big-module-that-gets-its-own-chunk
. This results in an error when the worker is loaded.Reproduce
A minimum viable example may be found at https://github.com/GingerIndustries/webworker-mre.
What is the expected behavior?
Workers loaded in a project under these conditions should only use ES module imports to load dependencies.
Other relevant information:
webpack version: 5.89.0
Node.js version: 18.13.0
Operating System: Debian Bookworm
Additional tools: None
The text was updated successfully, but these errors were encountered: