mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
fix: merge userConfig inside getViteConfig
(#11194)
This commit is contained in:
parent
a64428d11b
commit
97fbe938a9
3 changed files with 8 additions and 3 deletions
5
.changeset/tidy-days-decide.md
Normal file
5
.changeset/tidy-days-decide.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes an issue where the function `getViteConfig` wasn't returning the correct merged Astro configuration
|
|
@ -34,7 +34,7 @@ export function getViteConfig(inlineConfig: UserConfig, inlineAstroConfig: Astro
|
|||
dest: nodeLogDestination,
|
||||
level: 'info',
|
||||
});
|
||||
const { astroConfig: config } = await resolveConfig(inlineAstroConfig, cmd);
|
||||
const { astroConfig: config, userConfig } = await resolveConfig(inlineAstroConfig, cmd);
|
||||
let settings = await createSettings(config, inlineConfig.root);
|
||||
settings = await runHookConfigSetup({ settings, command: cmd, logger });
|
||||
const viteConfig = await createVite(
|
||||
|
@ -48,6 +48,6 @@ export function getViteConfig(inlineConfig: UserConfig, inlineAstroConfig: Astro
|
|||
{ settings, logger, mode }
|
||||
);
|
||||
await runHookConfigDone({ settings, logger });
|
||||
return mergeConfig(viteConfig, inlineConfig);
|
||||
return mergeConfig(viteConfig, userConfig);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -199,5 +199,5 @@ export async function resolveConfig(
|
|||
const mergedConfig = mergeConfig(userConfig, inlineUserConfig);
|
||||
const astroConfig = await validateConfig(mergedConfig, root, command);
|
||||
|
||||
return { userConfig, astroConfig };
|
||||
return { userConfig: mergedConfig, astroConfig };
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue