-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
When navigating to a non-existent page with the data suffix e.g., /example/__data.json, the error page fails to load the js and css assets. This is happening because we strip the data suffix in the request URL.
kit/packages/kit/src/runtime/server/respond.js
Lines 111 to 112 in c0f3c40
| url.pathname = | |
| strip_data_suffix(url.pathname) + |
So, the asset relative paths are returned one directory short when SvelteKit thinks the request URL is /example instead of /example/__data.json.
Reproduction
- Open https://stackblitz.com/edit/sveltejs-kit-template-default-lwxx8r?file=README.md
- Run
pnpm build && pnpm preview - Navigate to
/anything/__data.json
Expected: Ordinary styled error page.
Actual: Unstyled error page.
Logs
No response
System Info
stackblitzSeverity
annoyance
Additional Information
No response
TravisSpomer
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working