Open RodrigoTomeES opened 2 years ago
Hi,
Try changing the following line In your preview.js
- import '!style-loader!css-loader!postcss-loader!@styles/storybook.css';
+ import '@styles/storybook.css';
The reason for the error is that Vite doesn't understand Webpack's import loader syntax !style-loader!css-loader!postcss-loader!
.
@haleksandre Hi, thanks! I also tried that before, but I had got this error. I don't understand why it says it finds the symbol "<" when it doesn't exist.
It's pretty late, but i came across the same issue and got it working with simply importing
import 'tailwindcss/tailwind.css';
instead of
import '@styles/storybook.css';
I came across this in a DaisyUI-Example (tailwind-based component library).
Hi!,
I am triying to make more efficient my storybook build, I first tried SWC but I only had a improvent in build time not in HMR, the creator of SWC for Storybook recommend me use vite instead so I am here!, First of all thanks for your hard work. I am trying to configurate Vite with PostCSS, Tailwind and custom alias.
My OLD configuration is this:
I followed the examples and I add the storybook-builder-vite as builder, enabled storyStoreV7 and added viteFinal instead of webpackFinal.
But I am receiving this error in the stories:
And in the console it show this:
I am importing my styles in preview.js
System
Can anyone help me? Thanks!