From 60a7345580cfbc648369e90607ec4aaeced9200a Mon Sep 17 00:00:00 2001 From: George Karagkiaouris Date: Wed, 16 Nov 2022 13:57:50 -0500 Subject: [PATCH] fix(bundling): fix webpack `publicPath: 'auto'` behavior for `esm` builds (#13186) Fixes https://github.com/nrwl/nx/issues/13185 --- packages/webpack/src/utils/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/webpack/src/utils/config.ts b/packages/webpack/src/utils/config.ts index 65091930fa12b..2d7e04860f8b6 100644 --- a/packages/webpack/src/utils/config.ts +++ b/packages/webpack/src/utils/config.ts @@ -90,6 +90,7 @@ export function getBaseWebpackPartial( hashFunction: 'xxhash64', // Disabled for performance pathinfo: false, + scriptType: internalOptions.esm ? 'module' : undefined, }, module: { // Enabled for performance