Skip to content

Commit

Permalink
Ensure chunk filenames are consistent for long-term caching
Browse files Browse the repository at this point in the history
Per https://webpack.js.org/configuration/output/#template-strings, `contenthash` is based on the final content of the chunk file. Given the same file contents, the filename is guaranteed to be the same.

Resolves embroider-build#519
  • Loading branch information
davidtaylorhq committed Nov 7, 2022
1 parent 5741550 commit e24cfeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ember-auto-import/ts/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ export default class WebpackBundler extends Plugin implements Bundler {
output: {
path: join(this.outputPath, 'assets'),
publicPath: this.opts.publicAssetURL,
filename: `chunk.[id].[chunkhash].js`,
chunkFilename: `chunk.[id].[chunkhash].js`,
filename: `chunk.[id].[contenthash].js`,
chunkFilename: `chunk.[id].[contenthash].js`,
libraryTarget: 'var',
library: '__ember_auto_import__',
},
Expand Down

0 comments on commit e24cfeb

Please sign in to comment.