mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
fix: invoke vite.build with up to date configuration during astro:build:setup hook when target is "client" (#12763)
Co-authored-by: Alberto Matías <alberto.matias@bestsecret.com>
This commit is contained in:
parent
483da89cf6
commit
8da2318551
2 changed files with 7 additions and 2 deletions
5
.changeset/heavy-dots-sip.md
Normal file
5
.changeset/heavy-dots-sip.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixed changes to vite configuration made in the astro:build:setup integration hook having no effect when target is "client"
|
|
@ -283,7 +283,7 @@ async function clientBuild(
|
|||
base: settings.config.base,
|
||||
};
|
||||
|
||||
await runHookBuildSetup({
|
||||
const updatedViteBuildConfig = await runHookBuildSetup({
|
||||
config: settings.config,
|
||||
pages: internals.pagesByKeys,
|
||||
vite: viteBuildConfig,
|
||||
|
@ -291,7 +291,7 @@ async function clientBuild(
|
|||
logger: opts.logger,
|
||||
});
|
||||
|
||||
const buildResult = await vite.build(viteBuildConfig);
|
||||
const buildResult = await vite.build(updatedViteBuildConfig);
|
||||
return buildResult;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue