mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 13:41:18 +08:00
26 lines
746 B
JavaScript
26 lines
746 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
stories: ['../src/stories/**/*.stories.js'],
|
|
addons: [
|
|
'@storybook/addon-storysource/register',
|
|
'@storybook/addon-actions/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',
|
|
'@storybook/addon-a11y/register',
|
|
],
|
|
webpack: async config => {
|
|
config.module.rules.push({
|
|
test: [/\.stories\.js$/],
|
|
loaders: [require.resolve('@storybook/source-loader')],
|
|
include: [path.resolve(__dirname, '../src')],
|
|
enforce: 'pre',
|
|
});
|
|
return config;
|
|
},
|
|
};
|