From 0c9837c96dcb52f04ab16eebbff89e12d96cfdd5 Mon Sep 17 00:00:00 2001 From: igor-dv Date: Wed, 5 Dec 2018 12:48:07 +0200 Subject: [PATCH] Fix "angular-cli/.storybook/webpack.config.ts" --- .../angular-cli/.storybook/webpack.config.ts | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/angular-cli/.storybook/webpack.config.ts b/examples/angular-cli/.storybook/webpack.config.ts index e649449c1a5..952d18125f6 100644 --- a/examples/angular-cli/.storybook/webpack.config.ts +++ b/examples/angular-cli/.storybook/webpack.config.ts @@ -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; + }, };