You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a base path and a prerendered root page deployed to Netlify causes the URL without a trailing slash /base-path to have broken CSS and JS links while the URL with a trailing slash /base-path/ returns the 404 page.
If the root page is not prerendered but we still have a base path, the URL without a trailing slash returns a 404 text response and the URL with a trailing slash successfully returns the root page.
I think the expected outcome is for the URL without a trailing slash to return the root page and the URL with a trailing slash to redirect to the URL without a trailing slash.
Reproduction
Prerender the root page src/routes/+page.svelte
Add a base path to svelte.config.js
Build and deploy to Netlify using the netlify adapter @sveltejs/adapter-netlify
Logs
No response
System Info
.
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered:
When a base path is set, the root page in builder.prerendered.paths ends with a trailing slash despite the description of the property saying that it doesn't:
/** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */
paths: string[];
This causes the trailing slash path /base-path/ to be excluded from the edge manifest instead of the non-trailing slash path /base-path so it hits the edge function instead of our prerendered page?
Describe the bug
Having a base path and a prerendered root page deployed to Netlify causes the URL without a trailing slash
/base-path
to have broken CSS and JS links while the URL with a trailing slash/base-path/
returns the 404 page.If the root page is not prerendered but we still have a base path, the URL without a trailing slash returns a 404 text response and the URL with a trailing slash successfully returns the root page.
I think the expected outcome is for the URL without a trailing slash to return the root page and the URL with a trailing slash to redirect to the URL without a trailing slash.
Reproduction
src/routes/+page.svelte
svelte.config.js
@sveltejs/adapter-netlify
Logs
No response
System Info
.
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: