-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static adapter failing builds when route ends with .html #8676
Comments
This is a duplicate of #7244 but I closed that issue in favor of this one because of the better title and clear reproduction. |
Thanks so much, @dummdidumm! |
Just spitballing, but one possible solution might be to do something like this: -/some-route/__data.json
+/_data/some-route.json IIRC the only real reason we use a suffix rather than a prefix is that it's more convenient to inspect the output on disk if it's colocated, and marginally easier to inspect in a browser by appending something to the URL rather than the alternative. But I think this bug probably trumps the convenience argument, given that we basically recommend Note that it's @john-michael-murphy would that work in your case or would the prerendered data need to come from |
@Rich-Harris we're actually rendering on alpha preview via a whole new mechanism we devised. We can totally work around this issue for now by removing the extension. |
@Rich-Harris realizing that I did not totally understood some of the implications of what you were suggesting. It would be awesome if we could locate page data in |
Quick aside, in case someone else runs into this thread for the same reasons I did. When deploying a static, prerendered site to Vercel, you'll likely want to enable the |
I have also encountered this issue, in trying to migrate my website to SvelteKit. That introduces a number of links to other pages in my site, which SvelteKit promptly scans and builds as well. After successfully prerendering every page of my blog, we reach the This behavior apparently reproduces with With that in mind, I second the suggestion that SvelteKit should place these files (the Thanks everyone for your time, and I understand if this isn't top priority for anyone. |
For some extra context, the issue happens at https://github.com/sveltejs/kit/blob/master/packages/kit/src/core/adapt/builder.js#L192-L195, since they're copied to the same pre-rendered directory |
How would changing this from being a suffix (like |
Rich and I just talked about it, we're going to try to implement the |
Somewhat separately, I had been wanting to propose something like The other option for what I want to do might be some sort of partial prerendering, but it feels like that would require entirely rearchitecting how prerendering works and I really don't know how we'd do it exactly. Edit: |
Maybe this line also needs to move to I'm having to recall, but I think the issue I was worried about is that if we added a |
closed by #11269 |
Describe the bug
Consider this app with one route:
potato.html
, where.html
is explicitly defined in the url:When prerendering server-side only pages with adapter-static, the following error is always encountered:
Reproduction
Create a skeleton sveltekit project.
Create a route and explicitly define the
.html
extension in the route.Add a server side-only page route.
Try to prerender and build that page with static-adapter.
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: