From 69af658b00be0a3b1bb0eb11c2e480973a5a6301 Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Fri, 7 Jan 2022 18:00:19 -0500 Subject: [PATCH] Fix issue with plugins running twice in dev and build (#2323) * Fix issue with plugins running twice in dev and build * nit: only patch plugins * nit: only patch plugins * nit: only solve for create-vite * nit: only solve for create-vite * Create seven-mice-do.md Co-authored-by: Fred K. Schott --- .changeset/seven-mice-do.md | 5 +++++ packages/astro/src/core/create-vite.ts | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/seven-mice-do.md diff --git a/.changeset/seven-mice-do.md b/.changeset/seven-mice-do.md new file mode 100644 index 000000000..39d7f8125 --- /dev/null +++ b/.changeset/seven-mice-do.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fix issue with plugins running twice in dev and build diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 80fd870c0..c8b504ad6 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -91,8 +91,6 @@ export async function createVite(inlineConfig: ViteConfigWithSSR, { astroConfig, } } - // Add in user settings last, followed by any Vite configuration passed in from the parent function (overrides) - viteConfig = vite.mergeConfig(viteConfig, astroConfig.vite || {}); // merge in Vite config from astro.config.mjs viteConfig = vite.mergeConfig(viteConfig, inlineConfig); // merge in inline Vite config return viteConfig; }