From 0d91b99d74aaa8048e5a7c440e15404a3bf60e79 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 14 Jun 2022 14:17:49 +0100 Subject: [PATCH] fix: don't use file url when building prerenderer (#286) --- src/rollup/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rollup/config.ts b/src/rollup/config.ts index 67d11db566..567717c52b 100644 --- a/src/rollup/config.ts +++ b/src/rollup/config.ts @@ -213,8 +213,8 @@ export const plugins = [ // https://github.com/rollup/plugins/tree/master/packages/alias let buildDir = nitro.options.buildDir - // Windows (native) dynamic imports should be file:// urr - if (isWindows && (nitro.options.externals?.trace === false)) { + // Windows (native) dynamic imports should be file:// urls + if (isWindows && (nitro.options.externals?.trace === false) && nitro.options.dev) { buildDir = pathToFileURL(buildDir).href } rollupConfig.plugins.push(alias({