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

Using WebWorkerChunkTemplatePlugin generates modules in an unrecognized way #351

Closed
Gongreg opened this issue May 18, 2020 · 1 comment · Fixed by #353
Closed

Using WebWorkerChunkTemplatePlugin generates modules in an unrecognized way #351

Gongreg opened this issue May 18, 2020 · 1 comment · Fixed by #353

Comments

@Gongreg
Copy link
Contributor

Gongreg commented May 18, 2020

Issue description

While working using webpack for web-worker with chunks WebWorkerChunkTemplatePlugin The source is created in this format:

source.add(
	`${globalObject}[${JSON.stringify(
		chunkCallbackName
	)}](${JSON.stringify(chunk.ids)},`
);

So:

self["chunkCallbackName"]([9],{

or

self.chunkCallbackName([9],{ 

when the code is minified.

There should be a check for this.

@valscion
Copy link
Member

PR is welcome ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants