DEV: Use correct vendor file when using ember-cli proxy in prod mode (#25224)

This commit is contained in:
David Taylor 2024-01-11 13:27:21 +00:00 committed by GitHub
parent 63a50b12fd
commit a15399fcea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,12 @@ function updateScriptReferences({
if (!chunks) {
if (distAssets.has(`${entrypointName}.js`)) {
chunks = [`assets/${entrypointName}.js`];
} else if (entrypointName === "vendor") {
// support embroider-fingerprinted vendor when running with `-prod` flag
const vendorFilename = [...distAssets].find((key) =>
key.startsWith("vendor.")
);
chunks = [`assets/${vendorFilename}`];
} else {
// Not an ember-cli asset, do not rewrite
return;