Skip to content

Commit

Permalink
Fix plugin apply args when filtering (#6601)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Mar 21, 2023
1 parent 0344465 commit f112c12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tame-taxis-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix plugin apply args when filtering
2 changes: 1 addition & 1 deletion packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export async function createVite(
const applyToFilter = command === 'build' ? 'serve' : 'build';
const applyArgs = [
{ ...settings.config.vite, mode },
{ command, mode },
{ command: command === 'dev' ? 'serve' : command, mode },
];
// @ts-expect-error ignore TS2589: Type instantiation is excessively deep and possibly infinite.
plugins = plugins.flat(Infinity).filter((p) => {
Expand Down

0 comments on commit f112c12

Please sign in to comment.