Since updating to V7 my tailwind styles are not longer working
This was my old config (main.js)
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
stories: ['../**/*.stories.mdx', '../**/*.stories.@(js|jsx|ts|tsx)'],
/** Expose next public folder to storybook as static */
staticDirs: ['../public'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
},
},
},
"storybook-css-modules",
],
core: {
builder: 'webpack5',
},
webpackFinal: (config) => {
config.resolve.alias = {
...config.resolve?.alias,
'@': [path.resolve(__dirname, '../'), path.resolve(__dirname, '../')],
};
config.resolve.roots = [
path.resolve(__dirname, '../public'),
'node_modules',
];
config.resolve.plugins = [new TsconfigPathsPlugin()];
return config;
},
};
And this is my new main.ts
import type { StorybookConfig } from "@storybook/nextjs";
const config: StorybookConfig = {
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
},
},
},
],
framework: {
name: "@storybook/nextjs",
options: {},
},
docs: {
autodocs: "tag",
},
/** Expose next public folder to storybook as static */
staticDirs: ['../public'],
};
export default config;
I also have import '../assets/main.css'; at the top of preview.ts. I saw a couple of threads we similar issues, but i couldnt see a solution. Any ideas?