const path = require('path');

module.exports = {
  stories: [
    '../components/**/*.stories.tsx',
    '../icons/**/*.stories.tsx',
    '../stories/*.stories.tsx',
  ],
  addons: [
    '@storybook/addon-essentials',
    '@storybook/addon-a11y',
    'storybook-tailwind-dark-mode',
  ],
  webpackFinal: async (config) => {
    config.module.rules.push({
      test: /\.css$/,
      use: [
        {
          loader: 'postcss-loader',
        },
      ],
      include: path.resolve(__dirname, '../'),
    });
    return config;
  },
};
