mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-01 05:05:25 +08:00
16 lines
390 B
JavaScript
16 lines
390 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = async ({ config }) => {
|
|
config.module.rules.push({
|
|
test: [/\.stories\.js$/, /index\.js$/],
|
|
loaders: [require.resolve('@storybook/addon-storysource/loader')],
|
|
include: [path.resolve(__dirname, '../src')],
|
|
enforce: 'pre',
|
|
});
|
|
config.module.rules.push({
|
|
test: /\.txt$/,
|
|
use: 'raw-loader',
|
|
});
|
|
return config;
|
|
};
|