Fix "angular-cli/.storybook/webpack.config.ts"

This commit is contained in:
igor-dv 2018-12-05 12:48:07 +02:00
parent 1790d3b315
commit 0c9837c96d

View File

@ -1,19 +1,21 @@
const path = require('path');
module.exports = (baseConfig: any) => {
baseConfig.module.rules.push({
test: [/\.stories\.tsx?$/, /index\.ts$/],
loaders: [
module.exports = {
module: {
rules: [
{
loader: require.resolve('@storybook/addon-storysource/loader'),
options: {
parser: 'typescript',
},
test: [/\.stories\.tsx?$/, /index\.ts$/],
loaders: [
{
loader: require.resolve('@storybook/addon-storysource/loader'),
options: {
parser: 'typescript',
},
},
],
include: [path.resolve(__dirname, '../src')],
enforce: 'pre',
},
],
include: [path.resolve(__dirname, '../src')],
enforce: 'pre',
});
return baseConfig;
},
};