Open lkmadushan opened 3 years ago
Do you use PostCSS 8? I am having issues with the same stack, had to use storybook for webpack 5. Inertia is requiring Webpack 5 , but also Postcss 8 which requires different plugin configuration in storybook. Check this out.
I am missing something in my stack because in my case I can´t understand how to import Tailwind and Postcss-import in storybook the same way laravel mix does. Tailwind is just not working but stories does.
You are using webpackFinal
I assume it is loading mix config maybe this is what I am missing.
You can check my stackoverflow question so maybe you can find something I didn't see.
I bet your main issue could be you set Postcss plugin config is set like this:
module.exports = {
addons: ['@storybook/addon-postcss'],
};
But you need to set it up like this for Postcss 8+
module.exports = {
addons: [
- '@storybook/addon-postcss',
+ {
+ name: '@storybook/addon-postcss',
+ options: {
+ postcssLoaderOptions: {
+ implementation: require('postcss'),
+ },
+ },
+ },
]
}
I have absolut no idea about how Tailwind and Postcss should be configured in Storybook with our stack, Laravel mix is not even using autoprefixer, I bet this is because JIT mode but I don't really know.
Hope this helps!
@moracabanas yeah, I am using PostCSS 8. but it doesn't work even if I add your changes. did you have a chance to setup it properly?
Describe the bug The addon is not working with the following configuration as per the documentation.
To Reproduce Used the above configuration with Laravel inertia stack.
Laravel: 8.53.0 Laravel Mix: 6.0.27 Vue: 3
System