Skip to content

Commit

Permalink
Fix HTML content failing to update
Browse files Browse the repository at this point in the history
This is an alternate fix for #1474
  • Loading branch information
ef4 committed Sep 12, 2023
1 parent 17cf74c commit c4b63b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/webpack/src/ember-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ 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);
await this.writeFiles(this.bundleSummary, this.lastAppInfo!, variantIndex);
});
},
],
Expand Down Expand Up @@ -294,6 +294,12 @@ const Webpack: PackagerConstructor<Options> = class Webpack implements Packager
private getWebpack(appInfo: AppInfo) {
if (this.lastWebpack && this.lastAppInfo && equalAppInfo(appInfo, this.lastAppInfo)) {
debug(`reusing webpack config`);
// the appInfos result in equal webpack configs so we don't need to
// reconfigure webpack. But they may contain other changes (like HTML
// content changes that don't alter the webpack config) so we still want
// lastAppInfo to update so that the latest one will be seen in the
// webpack post-build.
this.lastAppInfo = appInfo;
return this.lastWebpack;
}
debug(`configuring webpack`);
Expand Down

0 comments on commit c4b63b0

Please sign in to comment.