Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-pugs-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-netlify': patch
---

fix: strip trailing slashes from prerendered paths in the edge function exclude list, so the root page is served statically when using a base path
3 changes: 2 additions & 1 deletion packages/adapter-netlify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ async function generate_edge_functions({ builder }) {
// Contains static files
`/${builder.getAppPath()}/immutable/*`,
`/${builder.getAppPath()}/version.json`,
...builder.prerendered.paths,
// the base root and `trailingSlash: 'always'` pages are recorded with a trailing slash
...builder.prerendered.paths.map((path) => (path === '/' ? path : path.replace(/\/$/, ''))),
...Array.from(assets).flatMap((asset) => {
if (asset.endsWith('/index.html')) {
const dir = asset.replace(/\/index\.html$/, '');
Expand Down
Loading