Skip to content

Prerendered root page with base path enabled is broken on Netlify #13310

Description

@teemingc

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

  1. Prerender the root page src/routes/+page.svelte
  2. Add a base path to svelte.config.js
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions