-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[v6 + Cloudflare] Markdoc component <style> not extracted in dev server #16013
Copy link
Copy link
Closed
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)pkg: cloudflareRelated to the Cloudflare adapterRelated to the Cloudflare adapterpkg: markdocRelated to the `@astrojs/markdoc` package (scope)Related to the `@astrojs/markdoc` package (scope)
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)pkg: cloudflareRelated to the Cloudflare adapterRelated to the Cloudflare adapterpkg: markdocRelated to the `@astrojs/markdoc` package (scope)Related to the `@astrojs/markdoc` package (scope)
Type
Fields
Give feedbackNo fields configured for issues without a type.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
All.
Describe the Bug
Styles defined in custom Markdoc component are not applied in the dev server with Cloudflare adapter. This does not affect the final production build.
After some testing, this bug is triggered when we have some level of indirection when calling the
<Content>component fromawait render(entry);: if<Content>is used in[...slugs].astrodirectly, then this bug does not occur.However, if we create a separate
<PostContent>Astro component and we passentryas parameter, then callawait render(entry)inside it, the bug is triggered (see reproduction repo).Page in dev server:
Same page in preview server, notice that we have now an inline
styletag inhead:To see the error, you should navigate to
/blog/testpage after starting the dev / preview server.What's the expected result?
The styling in dev server should be the same as in preview environment (production build).
Link to Minimal Reproducible Example
https://github.com/CaiJimmy/astro-v6-cloudflare-markdoc-component-style
Participation