Skip to content
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

Scope type not being changed when using comment on external file #827

Open
lgmf opened this issue Mar 2, 2023 · 0 comments
Open

Scope type not being changed when using comment on external file #827

lgmf opened this issue Mar 2, 2023 · 0 comments

Comments

@lgmf
Copy link

lgmf commented Mar 2, 2023

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

  • Version: next@11, node@14.19,3, npm@6.14.17
  • Browser: Chrome
  • OS: Mac

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:
    Screenshot 2023-03-02 at 17 13 35

  • On Prod:
    Screenshot 2023-03-02 at 17 14 37

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant