Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack5 webpack loads wrong worker when using two worker #44

Closed
linonetwo opened this issue May 30, 2021 · 1 comment
Closed

Webpack5 webpack loads wrong worker when using two worker #44

linonetwo opened this issue May 30, 2021 · 1 comment

Comments

@linonetwo
Copy link

linonetwo commented May 30, 2021

Basically the same as #6

It works fine in webpack4, and regression in webpack5. After using this method to load worker #37 (comment)
It only produces one worker file and its source map.

ERROR in Conflict: Multiple assets emit different content to the same filename 348.index.worker.js.map

ERROR in Conflict: Multiple assets emit different content to the same filename 348.index.worker.js
@linonetwo
Copy link
Author

Oh, just set different name in two loader import statements:

-import workerURL from 'threads-plugin/dist/loader?name=worker!./gitWorker.ts';
+import workerURL from 'threads-plugin/dist/loader?name=gitWorker!./gitWorker.ts';

-import workerURL from 'threads-plugin/dist/loader?name=worker!./wikiWorker.ts';
+import workerURL from 'threads-plugin/dist/loader?name=wikiWorker!./wikiWorker.ts';

linonetwo added a commit to tiddly-gittly/TidGi-Desktop that referenced this issue Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant