27 lines
706 B
JavaScript

const path = require('path');
module.exports = {
addons: [
'@storybook/addon-a11y',
'@storybook/addon-storysource',
'@storybook/addon-actions',
'@storybook/addon-docs',
'@storybook/addon-links',
'@storybook/addon-notes',
'@storybook/addon-knobs',
'@storybook/addon-viewport',
'@storybook/addon-options',
'@storybook/addon-backgrounds',
],
stories: ['../stories/**/*.stories.js'],
webpackFinal: async config => {
config.module.rules.push({
test: [/\.stories\.js$/, /index\.js$/],
loaders: [require.resolve('@storybook/source-loader')],
include: [path.resolve(__dirname, '../')],
enforce: 'pre',
});
return config;
},
};