Open lgmf opened 1 year ago
report a bug
The type is being ignored when set per individual CSS file via CSS comment like /* @styled-jsx=<type>*/ when using custom babel and webpack config.
/* @styled-jsx=<type>*/
This happens only for the production build (it works in dev mode).
Set the scope type per CSS file when it has a comment with /* @styled-jsx=<type> */
/* @styled-jsx=<type> */
Basically, I have this style that's supposed to be global
/* @styled-jsx=global */ *, *::before, *::after { box-sizing: border-box; font-family: "Roboto", sans-serif; } body { margin: 0; } p { font-size: 48px; font-weight: bold; }
On Dev:
On Prod:
Here's the link to the sample project to reproduce the bug: https://github.com/lgmf/next-styled-jsx-global-bug
Yes
Do you want to request a feature or report a bug?
report a bug
What is the current behavior?
The type is being ignored when set per individual CSS file via CSS comment like
/* @styled-jsx=<type>*/
when using custom babel and webpack config.This happens only for the production build (it works in dev mode).
What is the expected behavior?
Set the scope type per CSS file when it has a comment with
/* @styled-jsx=<type> */
Environment
Basically, I have this style that's supposed to be global
On Dev:![Screenshot 2023-03-02 at 17 13 35](https://user-images.githubusercontent.com/8532045/222541765-af0beba1-6e7b-4808-b200-255bb454d7d5.png)
On Prod:![Screenshot 2023-03-02 at 17 14 37](https://user-images.githubusercontent.com/8532045/222541934-e799fc02-a816-4c60-bb67-f7f7eceb962a.png)
Here's the link to the sample project to reproduce the bug: https://github.com/lgmf/next-styled-jsx-global-bug
Did this work in previous versions?
Yes