Created
April 17, 2020 18:30
-
-
Save gashcrumb/36bbda3c9c90763d54c71d61105184f0 to your computer and use it in GitHub Desktop.
terser fix for storybook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/ui-react/packages/.storybook/webpack.config.js b/app/ui-react/packages/.storybook/webpack.config.js | |
index 17fd6d6c82..e687c11b77 100644 | |
--- a/app/ui-react/packages/.storybook/webpack.config.js | |
+++ b/app/ui-react/packages/.storybook/webpack.config.js | |
@@ -1,5 +1,7 @@ | |
const path = require('path'); | |
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); | |
+const TerserPlugin = require('terser-webpack-plugin'); | |
+ | |
module.exports = ({ config, mode }) => { | |
config.module.rules.push({ | |
test: /\.tsx?$/, | |
@@ -26,5 +28,8 @@ module.exports = ({ config, mode }) => { | |
fs: 'empty', | |
net: 'mock', | |
}; | |
+ config.optimization.minimizer = [ new TerserPlugin({ | |
+ parallel: 1 | |
+ })]; | |
return config; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment