Skip to content

Commit

Permalink
use swc isntead of terser for that final step that takes 2 minutes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpme authored Mar 31, 2023
1 parent baa34bf commit cf3c76c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/app-extension/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const { ProgressPlugin, ProvidePlugin, DefinePlugin } = require("webpack");
const TerserPlugin = require("terser-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
Expand Down Expand Up @@ -219,6 +220,17 @@ const options = {
zlib: require.resolve("browserify-zlib"),
},
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
minify: TerserPlugin.swcMinify,
// `terserOptions` options will be passed to `swc` (`@swc/core`)
// Link to options - https://swc.rs/docs/config-js-minify
terserOptions: {},
}),
],
},
plugins: [
new DefinePlugin({
process: {
Expand Down

1 comment on commit cf3c76c

@vercel
Copy link

@vercel vercel bot commented on cf3c76c Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.