Skip to content

Commit fa4b880

Browse files
committed
Fixing bug where a second rebuild would explode due to entrypoints.json
processing
1 parent c2f386f commit fa4b880

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/plugins/entry-files-manifest.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ function processOutput(assets) {
1919
delete assets[entry];
2020
}
2121

22+
// with --watch or dev-server, subsequent calls will include
23+
// the original assets (so, assets.entrypoints) + the new
24+
// assets (which will have their original structure). We
25+
// delete the entrypoints key, and then process the new assets
26+
// like normal below
27+
delete assets.entrypoints;
28+
2229
// This will iterate over all the entry points and remove the / from the start of the paths. It also converts the
2330
// one file entries into an array of one entry since that was how the entry point file was before this change.
2431
for (const asset in assets) {

0 commit comments

Comments
 (0)