mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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: {
|
autoImport: {
|
||||||
forbidEval: true,
|
forbidEval: true,
|
||||||
insertScriptsAt: "ember-auto-import-scripts",
|
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: {
|
fingerprint: {
|
||||||
// Handled by Rails asset pipeline
|
// Handled by Rails asset pipeline
|
||||||
|
Loading…
Reference in New Issue
Block a user