diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index 14e8fded13..f618a4860d 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -55,6 +55,18 @@ export async function bundle (nuxt: Nuxt) { build: { emptyOutDir: false }, + server: { + fs: { + strict: true, + allow: [ + nuxt.options.buildDir, + nuxt.options.appDir, + nuxt.options.srcDir, + nuxt.options.rootDir, + ...nuxt.options.modulesDir + ] + } + }, plugins: [] } as ViteOptions )