Skip to content

Commit

Permalink
fix: svelte back compat
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 20, 2024
1 parent 7e9dd25 commit 0166bfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,10 @@ export async function resolveConfig(

const isBuild = command === 'build'

// run config hooks
const userPlugins = [...prePlugins, ...normalPlugins, ...postPlugins]
config = await runConfigHook(config, userPlugins, configEnv)

// Ensure default client and ssr environments
// If there are present, ensure order { client, ssr, ...custom }
config.environments ??= {}
Expand All @@ -842,10 +846,6 @@ export async function resolveConfig(
config.environments = { client: {}, ...config.environments }
}

// run config hooks
const userPlugins = [...prePlugins, ...normalPlugins, ...postPlugins]
config = await runConfigHook(config, userPlugins, configEnv)

// Define logger
const logger = createLogger(config.logLevel, {
allowClearScreen: config.clearScreen,
Expand Down

0 comments on commit 0166bfe

Please sign in to comment.