-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedPRs welcomed. The implementation details are unlikely to cause debatePRs welcomed. The implementation details are unlikely to cause debatep1-importantSvelteKit cannot be used by a large number of people, basic functionality is missing, etc.SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.
Milestone
Description
Describe the bug
The second half of #3848 — https://kit.svelte.dev/docs is failing at the moment because (AFAICT) it's attempting to server-render /docs.json which was (necessarily, because it uses the filesystem) prerendered during build.
SvelteKit has logic for loading e.g. static/docs.json via fetch rather than attempting to server-render it here...
kit/packages/kit/src/runtime/server/page/load_node.js
Lines 162 to 176 in d788cf2
| if (is_asset || is_asset_html) { | |
| const file = is_asset ? filename : filename_html; | |
| if (options.read) { | |
| const type = is_asset | |
| ? options.manifest._.mime[filename.slice(filename.lastIndexOf('.'))] | |
| : 'text/html'; | |
| response = new Response(options.read(file), { | |
| headers: type ? { 'content-type': type } : {} | |
| }); | |
| } else { | |
| response = await fetch(`${url.origin}/${file}`, /** @type {RequestInit} */ (opts)); | |
| } | |
| } else if (is_root_relative(resolved)) { |
Reproduction
go to https://kit.svelte.dev/docs
Logs
No response
System Info
System:
OS: macOS 12.0.1
CPU: (10) arm64 Apple M1 Max
Memory: 89.55 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Browsers:
Chrome: 98.0.4758.80
Firefox: 96.0.3
Safari: 15.1
npmPackages:
@sveltejs/vite-plugin-svelte: ^1.0.0-next.32 => 1.0.0-next.32
svelte: ^3.44.2 => 3.44.2
vite: ^2.8.0 => 2.8.0Severity
serious, but I can work around it
Additional Information
No response
hyunbinseo and robots4life
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedPRs welcomed. The implementation details are unlikely to cause debatePRs welcomed. The implementation details are unlikely to cause debatep1-importantSvelteKit cannot be used by a large number of people, basic functionality is missing, etc.SvelteKit cannot be used by a large number of people, basic functionality is missing, etc.