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

Dynamic import styled-jss #80

Open
vietduc1441 opened this issue Aug 14, 2020 · 0 comments
Open

Dynamic import styled-jss #80

vietduc1441 opened this issue Aug 14, 2020 · 0 comments

Comments

@vietduc1441
Copy link

I want to dynamic import "styled-jss" and able to do that so styled-jss become a chunk and only loaded when one of my styled components loaded. For simple case, it works (see sandbox link below)

Expected behavior:
+Component selector should work.
+Style should cached somehow.

The bug:
+Component selector doens't work:

image

+Similar classes generated multiple times:
image

Codesandbox:
https://codesandbox.io/s/styled-jss-playground-9f5j0?file=/index.js

Versions (please complete the following information):__

  • jss: 10.3.0
  • styled-jss: 2.2.3
  • Browser: Chrome
  • OS: Windows

Maybe the way i wrapped components is incorrect, if so, could you point me the way so i can fix it.

@kof kof transferred this issue from cssinjs/jss Apr 26, 2021
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