-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Server Islands not rendering as islands in .mdx
files
#12252
Comments
Will this be fixed in the |
The appears to work in dev mode, so the bug only appears in prod, is that right? |
This appears to be working for me. This is in prod, after a build. What am I missing? serverdefer.mp4 |
@matthewp click through to the blog post (the mdx file), and you will see that the Server Island within it is simply rendered statically. The home page server island is just to show that normal files work. When a normal astro file (index.astro) is prerendered, the server island works as expected. In |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Astro components imported into
.mdx
files that use propserver:dever
are rendered the same way as the page, i.e. dynamically or prerendered. I'm experiencing this using cloudflare adapter, but for the example I had to use nodejs for stackblitz.Server islands should not delay the entire page render in dev mode (seems to cause waterfall), and when pre-rendered should not be output statically.
Example
You can observer within the
dist
folder under client the entire page is rendered to static html, including the server island.What's the expected result?
The server island should behave the same as it does within an
.astro
file.Link to Minimal Reproducible Example
Note: you will need to run npm start to generate a preview build.
https://stackblitz.com/edit/github-njjrmi?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: