diff --git a/.changeset/fresh-lizards-whisper.md b/.changeset/fresh-lizards-whisper.md new file mode 100644 index 000000000000..aa276c94626c --- /dev/null +++ b/.changeset/fresh-lizards-whisper.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Only use Vite config from astro.config.mjs as source of truth diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 9c728301b258..fd23a27f552a 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -100,6 +100,8 @@ export async function createVite( // Start with the Vite configuration that Astro core needs const commonConfig: vite.InlineConfig = { + // Tell Vite not to combine config from vite.config.js with our provided inline config + configFile: false, cacheDir: fileURLToPath(new URL('./node_modules/.vite/', settings.config.root)), // using local caches allows Astro to be used in monorepos, etc. clearScreen: false, // we want to control the output, not Vite logLevel: 'warn', // log warnings and errors only