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 <fkschott@gmail.com>
This commit is contained in:
Jonathan Neal 2022-01-07 18:00:19 -05:00 committed by GitHub
parent b4d62e10ad
commit 69af658b00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Fix issue with plugins running twice in dev and build

View file

@ -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 viteConfig = vite.mergeConfig(viteConfig, inlineConfig); // merge in inline Vite config
return viteConfig; return viteConfig;
} }