Skip to content

Commit

Permalink
fix: keep plugins with create hook
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Apr 30, 2024
1 parent 527621e commit 12d467f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vite/src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export async function resolveBoundedPlugins(
): Promise<BoundedPlugin[]> {
const resolvedPlugins: BoundedPlugin[] = []
for (const plugin of environment.config.plugins) {
resolvedPlugins.push(plugin)
if (plugin.create) {
const boundedPlugin = await plugin.create(environment)
if (boundedPlugin) {
Expand All @@ -366,8 +367,6 @@ export async function resolveBoundedPlugins(
)
resolvedPlugins.push(...flatPlugins)
}
} else {
resolvedPlugins.push(plugin)
}
}
return resolvedPlugins
Expand Down

0 comments on commit 12d467f

Please sign in to comment.