Skip to content

Commit 69aafb1

Browse files
committed
fix: enable minification for rsbuild v2
1 parent 5a9307c commit 69aafb1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/build-tools/bundling/function/createRsbuildConfig.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ export const createRsbuildConfig = async ({ cwd }) => {
77
const { default: rspack } = await import("@rspack/core");
88
const paths = getPaths(cwd);
99
const mode = getMode();
10+
const isDebugEnabled = process.env.DEBUG === "true";
1011

1112
return /** @type {import("@rsbuild/core").RsbuildConfig} */ ({
1213
source: { entry: { index: paths.fn.entryFile } },
1314
output: {
1415
module: true,
1516
target: "node",
17+
minify: true,
1618
sourceMap: {
17-
js: process.env.DEBUG === "true" ? "source-map" : false
19+
js: isDebugEnabled ? "source-map" : false
1820
},
1921
filename: {
2022
js: pathData => {

0 commit comments

Comments
 (0)