diff --git a/frontend/libs/nx/internal-plugin/src/executors/build-server-assets/executor.ts b/frontend/libs/nx/internal-plugin/src/executors/build-server-assets/executor.ts index 3ba367bac0f..701f35cf402 100644 --- a/frontend/libs/nx/internal-plugin/src/executors/build-server-assets/executor.ts +++ b/frontend/libs/nx/internal-plugin/src/executors/build-server-assets/executor.ts @@ -111,6 +111,10 @@ export default async function runMyExecutor( validateAllowedAssets(extractedAssets); const loaderFile = generateAssetLoaderFile(extractedAssets); tree.write(`${serverAssetBase}/versioned/assetLoader.js`, loaderFile); + tree.write( + `${serverAssetBase}/versioned/main.js`, + generatePolyfillLoaderFile(loaderFile) + ); tree.write( `${serverAssetBase}/loaderPolyfill.js`, generatePolyfillLoaderFile(loaderFile) @@ -122,7 +126,7 @@ export default async function runMyExecutor( { commands: [ `gzip -f ${serverAssetBase}/versioned/assetLoader.js`, - `gzip -f ${serverAssetBase}/loaderPolyfill.js`, + `gzip -f ${serverAssetBase}/versioned/main.js`, ], parallel: false, __unparsed__: [],