From 37986bf23021670ac673354789d7a2bfaa2a22d8 Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Sun, 2 Jul 2023 20:11:21 -0500 Subject: [PATCH] fix: Overwrite files with the same name when renaming entrypoints in dev mode --- src/core/vite-plugins/multipageMove.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/vite-plugins/multipageMove.ts b/src/core/vite-plugins/multipageMove.ts index c54f5b26..dfdb696f 100644 --- a/src/core/vite-plugins/multipageMove.ts +++ b/src/core/vite-plugins/multipageMove.ts @@ -53,7 +53,7 @@ export function multipageMove( const oldAbsPath = resolve(config.outDir, oldBundlePath); const newAbsPath = resolve(config.outDir, newBundlePath); await ensureDir(dirname(newAbsPath)); - await fs.move(oldAbsPath, newAbsPath); + await fs.move(oldAbsPath, newAbsPath, { overwrite: true }); const renamedChunk = { ...bundle[oldBundlePath],