2018-08-28 00:43:36 +02:00

18 lines
443 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, '../src')],
enforce: 'pre',
});
defaultConfig.module.rules.push({
test: /\.txt$/,
use: 'raw-loader',
});
return defaultConfig;
};