From aab15e546a2d8d7b84600de7b963dd7e6c40c5ef Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Wed, 22 Jun 2022 19:41:43 -0400 Subject: [PATCH] refactor: move to use optimizeDeps.force option --- packages/astro/src/core/create-vite.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 07d73733f..7073513ea 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -59,6 +59,7 @@ export async function createVite( clearScreen: false, // we want to control the output, not Vite logLevel: 'warn', // log warnings and errors only optimizeDeps: { + force: true, entries: ['src/**/*'], // Try and scan a user’s project (won’t catch everything), exclude: ['node-fetch'], }, @@ -82,7 +83,6 @@ export async function createVite( 'import.meta.env.SITE': astroConfig.site ? `'${astroConfig.site}'` : 'undefined', }, server: { - force: true, // force dependency rebuild (TODO: enabled only while next is unstable; eventually only call in "production" mode?) hmr: process.env.NODE_ENV === 'test' || process.env.NODE_ENV === 'production' ? false