Skip to content

Commit

Permalink
Fix issue with plugins running twice in dev and build (#2323)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Jonathan Neal and FredKSchott authored Jan 7, 2022
1 parent b4d62e1 commit 69af658
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-mice-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fix issue with plugins running twice in dev and build
2 changes: 0 additions & 2 deletions packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 69af658

Please sign in to comment.