Skip to content

Commit

Permalink
added __DEV__ resolution to webpack config for storybook (#1608)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunn4r authored and jaredpalmer committed Jun 14, 2019
1 parent 90e6e0f commit 7f493bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .storybook/webpack.config.js
@@ -1,4 +1,5 @@
const { TsConfigPathsPlugin } = require('awesome-typescript-loader');
const webpack = require('webpack');

module.exports = async ({ config, mode }) => {
config.module.rules.push({
Expand All @@ -10,6 +11,11 @@ module.exports = async ({ config, mode }) => {
});
config.resolve.extensions = ['.ts', '.tsx', '.js', '.jsx'];
config.resolve.plugins = [new TsConfigPathsPlugin({})];
config.plugins.push(
new webpack.DefinePlugin({
'__DEV__': process.env.NODE_ENV === 'development'
})
);

return config;
};

0 comments on commit 7f493bb

Please sign in to comment.