mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
PERF: Ensure JS chunk content and filenames are deterministic (#18907)
This commit works around a couple of issues in `ember-auto-import` which were causing non-deterministic chunk filenames and content. Deterministic output should improve cache-reusability across deploys. Refs: https://github.com/ef4/ember-auto-import/issues/519 https://github.com/ef4/ember-auto-import/pull/548 https://github.com/ef4/ember-auto-import/issues/478
This commit is contained in:
parent
091d83af60
commit
3673d3359c
@ -57,6 +57,19 @@ module.exports = function (defaults) {
|
||||
autoImport: {
|
||||
forbidEval: true,
|
||||
insertScriptsAt: "ember-auto-import-scripts",
|
||||
webpack: {
|
||||
output: {
|
||||
// Workaround for https://github.com/ef4/ember-auto-import/issues/519
|
||||
// Upstreamed in https://github.com/ef4/ember-auto-import/pull/548
|
||||
filename: `chunk.[id].[contenthash].js`,
|
||||
chunkFilename: `chunk.[id].[contenthash].js`,
|
||||
},
|
||||
optimization: {
|
||||
// Workaround to provide deterministic chunk output
|
||||
// See https://github.com/ef4/ember-auto-import/issues/478#issuecomment-1000526638
|
||||
moduleIds: "size",
|
||||
},
|
||||
},
|
||||
},
|
||||
fingerprint: {
|
||||
// Handled by Rails asset pipeline
|
||||
|
Loading…
Reference in New Issue
Block a user