From b9370be3b4199e57e32930bebc9d82b675a87269 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 25 Apr 2023 17:29:03 +0100 Subject: [PATCH] fix: apply `chunkFileNames` on windows (#1189) --- src/rollup/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rollup/config.ts b/src/rollup/config.ts index 0a8f11490d..f9f1590dba 100644 --- a/src/rollup/config.ts +++ b/src/rollup/config.ts @@ -73,7 +73,9 @@ export const getRollupConfig = (nitro: Nitro): RollupConfig => { entryFileNames: "index.mjs", chunkFileNames(chunkInfo) { let prefix = ""; - const lastModule = chunkInfo.moduleIds[chunkInfo.moduleIds.length - 1]; + const lastModule = normalize( + chunkInfo.moduleIds[chunkInfo.moduleIds.length - 1] + ); if (lastModule.startsWith(buildServerDir)) { prefix = join("app", relative(buildServerDir, dirname(lastModule))); } else if (lastModule.startsWith(runtimeAppDir)) {