diff options
Diffstat (limited to '.storybook/webpack.config.js')
-rw-r--r-- | .storybook/webpack.config.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js new file mode 100644 index 000000000..e542f1387 --- /dev/null +++ b/.storybook/webpack.config.js | |||
@@ -0,0 +1,17 @@ | |||
1 | const path = require('path'); | ||
2 | |||
3 | module.exports = (baseConfig, env, config) => { | ||
4 | config.module.rules.push({ | ||
5 | test: /\.(ts|tsx)$/, | ||
6 | use: [{ | ||
7 | loader: require.resolve('awesome-typescript-loader'), | ||
8 | options: { | ||
9 | configFileName: path.join(__dirname, '..', 'tsconfig.storybook.json'), | ||
10 | } | ||
11 | }, { | ||
12 | loader: require.resolve('react-docgen-typescript-loader'), | ||
13 | }] | ||
14 | }); | ||
15 | config.resolve.extensions.push('.ts', '.tsx'); | ||
16 | return config; | ||
17 | }; | ||