Skip to content

Commit

Permalink
minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 committed May 8, 2024
1 parent 615a1c6 commit 63e83e2
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const webpack = require("webpack")
const { copyFileSync, rmSync } = require("fs")
const TerserPlugin = require("terser-webpack-plugin")
const Log = require("next/dist/build/output/log")
const path = require("path")
const withMDX = require("@next/mdx")()
Expand All @@ -21,7 +22,7 @@ const nextConfig = {
return "brume"
},
webpack(config, options) {
config.optimization.minimize = false
config.optimization.minimize = true

config.module.rules.push({
test: /\.tsx?$/,
Expand Down Expand Up @@ -86,8 +87,8 @@ async function compileServiceWorker(config, options) {
filename: "service_worker.js"
},
optimization: {
minimize: false,
minimizer: []
minimize: true,
minimizer: [new TerserPlugin()]
}
})
}
Expand All @@ -110,8 +111,8 @@ async function compileContentScript(config, options) {
filename: "content_script.js"
},
optimization: {
minimize: false,
minimizer: []
minimize: true,
minimizer: [new TerserPlugin()]
}
})
}
Expand All @@ -134,8 +135,8 @@ async function compileInjectedScript(config, options) {
filename: "injected_script.js"
},
optimization: {
minimize: false,
minimizer: []
minimize: true,
minimizer: [new TerserPlugin()]
}
})
}
Expand All @@ -158,8 +159,8 @@ async function compileOffscreen(config, options) {
filename: "offscreen.js"
},
optimization: {
minimize: false,
minimizer: []
minimize: true,
minimizer: [new TerserPlugin()]
}
})
}
Expand Down

0 comments on commit 63e83e2

Please sign in to comment.