GitXplorerGitXplorer
A

webpack-sri-workers-contenthash-repro

public
0 stars
1 forks
0 issues

Commits

List of commits on branch main.
Verified
67c9db76459f90683cf09a978957ee2e6f66c90c

Create README.md

AAprilArcus committed 3 years ago
Verified
614fb067e3611392758f7a682f103516ee318fc1

Merge pull request #1 from roninjin10/main

AAprilArcus committed 3 years ago
Unverified
0f23b84804e7c33d9b53570fb5457691b3836d6f

make minimal plugin

committed 3 years ago
Unverified
f4f1fb024310731c6747cfff793680cb3a4809e1

initial commit

AAprilArcus committed 3 years ago

README

The README file for this repository.

Minimal reproduction for Webpack Subresource Integrity Plugin + Workers + contenthash

c.f. https://github.com/webpack/webpack/issues/13801

via @roninjin10:

Here is my investigation into this issue that lead to helping produce the minimal example:

If using contenthash with a WebWorker and any plugin is calling Maintemplate.prototype.hook.localVars such as the webpack-subresource-integrity plugin, the runtime starts requesting for undefined when it tries to load the web worker chunk both observed in the console and from adding logging in webpacks source .

Since this is happening as a sideeffect of calling .tap, I think the issue lies downstream of

https://github.com/webpack/webpack/blob/c181294865dca01b28e6e316636fef5f2aad4eb6/lib/RuntimePlugin.js#L365

mainTemplate.hooks.localVars.isUsed() || 

but I'm not sure.