const path = require('path'); const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); module.exports = { stories: ['../src/**/*.stories.tsx'], addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/preset-create-react-app', ], framework: { name: '@storybook/react-webpack5', options: {}, }, webpackFinal: async config => { config.resolve.plugins = config.resolve.plugins || []; config.resolve.plugins.push( new TsconfigPathsPlugin({ configFile: path.resolve(__dirname, '../tsconfig.json'), }), ); return config; }, docs: { autodocs: true, }, };