Skip to content

Commit 54cb1b8

Browse files
committed
bug #609 Fix old integrity hashes being added to the entrypoints.json with --watch (Lyrkan)
This PR was merged into the master branch. Discussion ---------- Fix old integrity hashes being added to the entrypoints.json with --watch This PR fixes a really small issue that I noticed while working on #608. When using `--watch` and `enableIntegrityHashes()` together it works fine for the first compilation, but on the next ones the old hashes also get added to the `entrypoints.json` file. **First compilation:** ```json { "entrypoints": { "main": { "js": [ "/build/main.js" ] } }, "integrity": { "/build/main.js": "<OLDHASH>" } } ``` **Second compilation:** ```json { "entrypoints": { "integrity": { "/build/main.js": ["<OLDHASH>"] }, "main": { "js": [ "/build/main.js" ] } }, "integrity": { "/build/main.js": "<NEWHASH>" } } ``` Commits ------- eecebb7 Fix old integrity hashes being added to the entrypoints.json with --watch
2 parents a6e3d84 + eecebb7 commit 54cb1b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/plugins/entry-files-manifest.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ function processOutput(webpackConfig) {
2828
// the original assets (so, assets.entrypoints) + the new
2929
// assets (which will have their original structure). We
3030
// delete the entrypoints key, and then process the new assets
31-
// like normal below
31+
// like normal below. The same reasoning applies to the
32+
// integrity key.
3233
delete assets.entrypoints;
34+
delete assets.integrity;
3335

3436
// This will iterate over all the entry points and convert the
3537
// one file entries into an array of one entry since that was how the entry point file was before this change.

0 commit comments

Comments
 (0)