const path = require('path');
module.exports = {
  "stories": [
    "../examples/stories/*.stories.mdx",
    "../examples/stories/**/*.stories.mdx",
    "../examples/stories/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/addon-interactions",
    "@storybook/addon-docs",
  ],
  "framework": "@storybook/vue3",
  "core": {
    "builder": "@storybook/builder-webpack5"
  },
  // 自定义webpack配置
  webpackFinal: async (config, { configType }) => {
    config.module.rules.push({
      test: /\.mjs$/,
      type: 'javascript/auto',
      resolve:{
        fullySpecified:false,
        extensions:['.js','.vue','.json']
      }
    });
    return config;
  },
  webpackFinal: async (config, { configType }) => {
    config.module.rules.push({
      test: /\.scss$/,
      use: ['style-loader', 'css-loader', 'sass-loader'],
      include: path.resolve(__dirname, '../'),
    });
    return config;
  },
}