mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 05:01:11 +08:00
27 lines
791 B
JavaScript
27 lines
791 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
addons: [
|
|
'@storybook/addon-a11y/register',
|
|
'@storybook/addon-storysource/register',
|
|
'@storybook/addon-actions/register',
|
|
'@storybook/addon-docs/register',
|
|
'@storybook/addon-links/register',
|
|
'@storybook/addon-notes/register',
|
|
'@storybook/addon-knobs/register',
|
|
'@storybook/addon-viewport/register',
|
|
'@storybook/addon-options/register',
|
|
'@storybook/addon-backgrounds/register',
|
|
],
|
|
stories: ['../stories/**/*.stories.js'],
|
|
webpack: 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;
|
|
},
|
|
};
|