Styles file not get packed when astro build
in SSG mode for react component wrapped with context
#8807
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: styling
Related to styles (scope)
pkg: react
Related to React (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
As shown below, everything is fine when doing
astro dev
.However,
astro build
andastro preview
I foundcount: 0
not styled with a red background color.With a little digging, it was due to
global.css
not effective in react component which was wrapped withReact.Context
Here is a minimal reproducible link
https://stackblitz.com/edit/withastro-astro-lvshyf?file=src%2Fstyles%2Fglobal.css,src%2Fcomponents%2FMathExam.tsx
What's the expected result?
I want a consistency behavior with
astro dev
andastro build
as incount: 0
withbackground color: red
afterastro build
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-lvshyf?file=src%2Fstyles%2Fglobal.css,src%2Fcomponents%2FMathExam.tsx
Participation
The text was updated successfully, but these errors were encountered: