diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/astro/src/core/build/static-build.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 921ae6a87..5c58fefb3 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -315,12 +315,13 @@ async function generatePath(pathname: string, opts: StaticBuildOptions, gopts: G debug(logging, 'generate', `Generating: ${pathname}`); + const rootpath = new URL(astroConfig.buildOptions.site || 'http://localhost/').pathname; const result = createResult({ astroConfig, origin, params, pathname, renderers }); result.links = new Set<SSRElement>( linkIds.map((href) => ({ props: { rel: 'stylesheet', - href, + href: npath.posix.join(rootpath, href) }, children: '', })) |