From 0166bfe90846df7f99c05f26f674627d1ee8a0b8 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Tue, 21 May 2024 00:05:04 +0200 Subject: [PATCH] fix: svelte back compat --- packages/vite/src/node/config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index ef75e4b1536f55..64d8884186e9d1 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -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 ??= {} @@ -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,