25 lines
679 B
JavaScript
25 lines
679 B
JavaScript
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: '@storybook/react',
|
|
core: {
|
|
builder: '@storybook/builder-webpack5',
|
|
},
|
|
webpackFinal: async config => {
|
|
config.resolve.plugins = config.resolve.plugins || [];
|
|
config.resolve.plugins.push(
|
|
new TsconfigPathsPlugin({
|
|
configFile: path.resolve(__dirname, '../tsconfig.json'),
|
|
}),
|
|
);
|
|
return config;
|
|
},
|
|
};
|