mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
21 lines
566 B
JavaScript
21 lines
566 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
stories: ['../src/stories/welcome.stories', '../src/stories/**/button.stories.js'],
|
|
logLevel: 'debug',
|
|
addons: [
|
|
'@storybook/preset-create-react-app',
|
|
'@storybook/addon-actions',
|
|
'@storybook/addon-links',
|
|
],
|
|
webpackFinal: (config) => {
|
|
// add monorepo root as a valid directory to import modules from
|
|
config.resolve.plugins.forEach((p) => {
|
|
if (Array.isArray(p.appSrcs)) {
|
|
p.appSrcs.push(path.join(__dirname, '..', '..', '..'));
|
|
}
|
|
});
|
|
return config;
|
|
},
|
|
};
|