-
Has anyone gotten this to work with Twin? The example is (I think?) not made for Snowpack 2. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Ah nevermind, it turned out to be pretty simple. Just change the snowpack.config.js file to:
The rest of the example is fine. |
Beta Was this translation helpful? Give feedback.
-
So while everything technically "works" styled components do not "fast refresh". I have to reload manually to get them to show. If I edit a normal React component everything refreshes on-the-fly just fine (including |
Beta Was this translation helpful? Give feedback.
-
@ben-rogerson I tried to setup Snowpack + React + Emotion from scratch and it seemed to work there. I'm not sure where particularly the issue lies so I'll hold off on submitting issues. FYI the issue also happens with the official example in this repo. Styled components using As a alternative I tried using styled components instead of emotion and that refreshes properly in both instances so I have switched to it for now. I submitted a PR with a new example for it here #41 (I just copied the emotion one and edited it). |
Beta Was this translation helpful? Give feedback.
Ah nevermind, it turned out to be pretty simple. Just change the snowpack.config.js file to:
The rest of the example is fine.