Skip to content

Commit

Permalink
remove terser as webpack seems to handle minifying just fine
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-funk committed Sep 22, 2023
1 parent b0a2026 commit 3ea4573
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions client/src/core/build/createWebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { identity, uniq } from "lodash";
import MiniCssExtractPlugin from "mini-css-extract-plugin";
import path from "path";
import WatchMissingNodeModulesPlugin from "react-dev-utils/WatchMissingNodeModulesPlugin";
import TerserPlugin from "terser-webpack-plugin";
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
import webpack, { Configuration, Plugin } from "webpack";
import WebpackAssetsManifest from "webpack-assets-manifest";
Expand Down Expand Up @@ -193,36 +192,6 @@ export default function createWebpackConfig(
chunks: config.get("disableChunkSplitting") ? "async" : "all",
},
minimize: minimize || treeShake,
minimizer: [
// Minify the code.
new TerserPlugin({
terserOptions: {
compress: minimize
? {}
: {
defaults: false,
dead_code: true,
pure_getters: true,
side_effects: true,
unused: true,
passes: 2,
},
mangle: minimize,
keep_classnames: profilerSupport,
keep_fnames: profilerSupport,
output: {
comments: !minimize,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebookincubator/create-react-app/issues/2488
ascii_only: true,
},
safari10: true,
},
cache: enableBuildCache,
parallel: false,
sourceMap: !disableSourcemaps,
}),
],
},
devtool,
// These are the "entry points" to our application.
Expand Down

0 comments on commit 3ea4573

Please sign in to comment.