You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit of a strange one but I was debugging it for a long time before I found what was causing the problem.
My setup is postcss / Mantine 7 with Redwood, with Vite as the bundler on the dev server and webpack for Storybook.
On Vite/dev there are no problems because Vite automatically knows what it's doing when it comes to CSS / PostCSS, but with Storybook and Webpack, any import of any component (from /layouts or /components or anywhere else) that has a stylesheet into the Routes file will mean that that stylesheet is loaded before any global styles that are imported in storybook.preview.js. This means that different styles are applied in SB, meaning it's unusable.
A quick workaround is just to comment out the routes file while working in Storybook, but I thought it would be worth mentioning this here in case anyone has encountered a similar issue.
Closing this - the obvious thing to do is just import my global stylesheets in my Routes file. I don't know what's causing the issue but since I have a fix then whoever else encounters the problem can just do this.
What's not working?
This is a bit of a strange one but I was debugging it for a long time before I found what was causing the problem.
My setup is postcss / Mantine 7 with Redwood, with Vite as the bundler on the dev server and webpack for Storybook.
On Vite/dev there are no problems because Vite automatically knows what it's doing when it comes to CSS / PostCSS, but with Storybook and Webpack, any import of any component (from /layouts or /components or anywhere else) that has a stylesheet into the Routes file will mean that that stylesheet is loaded before any global styles that are imported in storybook.preview.js. This means that different styles are applied in SB, meaning it's unusable.
A quick workaround is just to comment out the routes file while working in Storybook, but I thought it would be worth mentioning this here in case anyone has encountered a similar issue.
Here's my storybook config:
I'm not sure of the best way to ignore the Routes file when webpack is loading in files, so any advice would be welcomed. Thank you in advance!
How do we reproduce the bug?
"plugins": [{ "name": "typescript-plugin-css-modules" }],
to web/tsconfig.jsonWhat's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: