Skip to content

Commit

Permalink
fix: regenerate appInfo before writing files (fix embroider-build#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobq committed Jun 2, 2022
1 parent 253c7c5 commit 9859f56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/webpack/src/ember-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ const Webpack: PackagerConstructor<Options> = class Webpack implements Packager
compiler => {
compiler.hooks.done.tapPromise('EmbroiderPlugin', async stats => {
this.summarizeStats(stats, variant, variantIndex);
await this.writeFiles(this.bundleSummary, appInfo, variantIndex);
// In case we're building with cached webpack instance,
// we don't want to reuse the old appInfo (and its already modified JSDOM)
const freshAppInfo = this.examineApp();
await this.writeFiles(this.bundleSummary, freshAppInfo, variantIndex);
});
},
],
Expand Down

0 comments on commit 9859f56

Please sign in to comment.