Describe the bug
Line 146 is incorrectly assigning the index.html name to the prerendered +server.js endpoint response because we're on the root path and the statement slices off the / character leaving us with an empty string / falsy value.
|
function output_filename(path, is_html) { |
|
const file = path.slice(config.paths.base.length + 1) || 'index.html'; |
|
|
|
if (is_html && !file.endsWith('.html')) { |
|
return file + (file.endsWith('/') ? 'index.html' : '.html'); |
|
} |
|
|
|
return file; |
|
} |
Ideally, it has a .json filename like other prerendered endpoints.
Reproduction
n/a
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
Describe the bug
Line 146 is incorrectly assigning the
index.htmlname to the prerendered +server.js endpoint response because we're on the root path and the statement slices off the/character leaving us with an empty string / falsy value.kit/packages/kit/src/core/postbuild/prerender.js
Lines 145 to 153 in 4559e66
Ideally, it has a .json filename like other prerendered endpoints.
Reproduction
n/a
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response