diff --git a/.changeset/gold-suns-repair.md b/.changeset/gold-suns-repair.md new file mode 100644 index 000000000..8865645f5 --- /dev/null +++ b/.changeset/gold-suns-repair.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix load `base` option in build diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 06bae75f4..48ace69c0 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -160,6 +160,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp ], publicDir: ssr ? false : viteConfig.publicDir, envPrefix: 'PUBLIC_', + base: astroConfig.base, }; await runHookBuildSetup({ @@ -230,6 +231,7 @@ async function clientBuild( ...(viteConfig.plugins || []), ], envPrefix: 'PUBLIC_', + base: astroConfig.base, } as ViteConfigWithSSR; await runHookBuildSetup({