2018-10-03 00:50:39 -07:00

13 lines
354 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, '../')],
enforce: 'pre',
});
return defaultConfig;
};