mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
44 lines
1.0 KiB
JavaScript
44 lines
1.0 KiB
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
stories: ['../src/stories/**/*.stories.@(js|mdx)'],
|
|
logLevel: 'debug',
|
|
addons: [
|
|
'@storybook/preset-create-react-app',
|
|
'@storybook/addon-ie11',
|
|
{
|
|
name: '@storybook/addon-docs/preset',
|
|
options: {
|
|
configureJSX: true,
|
|
},
|
|
},
|
|
'@storybook/addon-actions',
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-backgrounds',
|
|
'@storybook/addon-a11y',
|
|
'@storybook/addon-jest',
|
|
],
|
|
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;
|
|
},
|
|
core: {
|
|
builder: 'webpack4',
|
|
disableTelemetry: true,
|
|
},
|
|
staticDirs: ['../public'],
|
|
features: {
|
|
buildStoriesJson: true,
|
|
breakingChangesV7: true,
|
|
},
|
|
framework: {
|
|
name: '@storybook/react',
|
|
options: { fastRefresh: true },
|
|
},
|
|
};
|