2018-04-23 14:22:43 +03:00

13 lines
361 B
JavaScript

const path = require('path');
module.exports = (storybookBaseConfig, configType, defaultConfig) => {
defaultConfig.module.rules.push({
test: [/\.stories\.js$/, /index\.js$/],
loaders: [require.resolve('@storybook/addon-storysource/loader')],
include: [path.resolve(__dirname, '../stories')],
enforce: 'pre',
});
return defaultConfig;
};