Skip to content
Permalink
Browse files

added __DEV__ resolution to webpack config for storybook (#1608)

  • Loading branch information...
gunn4r authored and jaredpalmer committed Jun 14, 2019
1 parent 90e6e0f commit 7f493bb9add46145ed80ee840d5da990d65de950
Showing with 6 additions and 0 deletions.
  1. +6 −0 .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({
@@ -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.
You can’t perform that action at this time.