Skip to content

Instantly share code, notes, and snippets.

@gashcrumb
Created April 17, 2020 18:30
Show Gist options
  • Save gashcrumb/36bbda3c9c90763d54c71d61105184f0 to your computer and use it in GitHub Desktop.
Save gashcrumb/36bbda3c9c90763d54c71d61105184f0 to your computer and use it in GitHub Desktop.
terser fix for storybook
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