-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cloudflare adapter incorrectly marks intermediate SSR page as static #289
Comments
@LexSwed I don't think what you want to achieve works. You can't have the following, due to the overlapping rules issue:
|
Thanks @alexanderniebuhr |
I'm not fully sure, if I understand correctly, but I think it should be. Could you provide a valid |
In my case, every generated static path has to be included into the // automatically generated
{
"version": 1,
"include": ["/*"],
"exclude": [
"/",
// static files
"/feed/*"
]
} But since my root {
"version": 1,
"include": ["/*"],
"exclude": [
"/",
"/_astro/*",
// static files
// /feed/[slug] but not /feed*
"/feed/article-1",
"/feed/article-2",
"/feed/article-3",
"/feed/article-4",
"/feed/article-1/maybe/nested",
]
} E.g. |
Thanks for explaining, that specific case is not that easy to support, since it wouldn't work for projects with a lot of static pages, since there is a limit. I have to think about a way which allows to support this. |
Ouff, thanks @alexanderniebuhr 🙇 Surprised it's not considered as a regression, it used to work on
Is |
I understand that. However I want to note that it didn't work for other examples in v9. Many users ran into the maximum rules limit, if we don't use wildcards.
No we don't intended to stop supporting this use-case, but the intention for the automatic generation is to work for as many projects as possible, without optimizing it for specific cases. That means that it will be less optimized than a manually created one.
No. We can definitely fix the generation to render all routes again, but I don't think we can micro optimize it for cost for the time being. |
Astro Info
Describe the Bug
When using
@astrojs/[email protected]
with the next project structure:Generated
_routes.json
is:Which makes
/feed
page to not server render and render root/
instead.extend
ing the adapter config withmakes
wrangler
to fail due toOverlapping rules found.
, as/feed/*
is still generated in"exclude"
.What's the expected result?
Generated
_routes.json
works with/feed
ininclude
for SSR and/feed/*
inexclude
as static.Link to Minimal Reproducible Example
https://github.com/LexSwed/me.git
Participation
The text was updated successfully, but these errors were encountered: