From de57626a7a079bb4b64c467292699263e6bad547 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 5 Sep 2021 21:48:38 +0100 Subject: [PATCH] fix(nitro): emit chunk names without `#` (#477) --- packages/nitro/src/rollup/config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nitro/src/rollup/config.ts b/packages/nitro/src/rollup/config.ts index 60d956e18c..47cc06af40 100644 --- a/packages/nitro/src/rollup/config.ts +++ b/packages/nitro/src/rollup/config.ts @@ -89,6 +89,9 @@ export const getRollupConfig = (nitroContext: NitroContext) => { } else if (lastModule.includes('assets')) { prefix = 'assets' } + if (chunkInfo.name.includes('#')) { + return join('chunks', prefix, chunkInfo.name.replace(/#/g, '-') + '.mjs') + } return join('chunks', prefix, '[name].mjs') }, inlineDynamicImports: nitroContext.inlineDynamicImports,