diff --git a/.npmrc b/.npmrc index e69de29b..2c2e1dbf 100644 --- a/.npmrc +++ b/.npmrc @@ -0,0 +1 @@ +resolution-mode=highest \ No newline at end of file diff --git a/rspack/builtin-swc-loader/package.json b/rspack/builtin-swc-loader/package.json index b263cfa3..2b61737f 100644 --- a/rspack/builtin-swc-loader/package.json +++ b/rspack/builtin-swc-loader/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@rspack/core": "latest", - "@swc/helpers": "0.5.1" + "@swc/helpers": "0.5.1", + "@swc/plugin-remove-console": "1.5.113" } } diff --git a/rspack/builtin-swc-loader/rspack.config.js b/rspack/builtin-swc-loader/rspack.config.js index e7416a33..22d5c338 100644 --- a/rspack/builtin-swc-loader/rspack.config.js +++ b/rspack/builtin-swc-loader/rspack.config.js @@ -39,6 +39,16 @@ const config = { useBuiltins: false, }, }, + experimental: { + plugins: [ + [ + "@swc/plugin-remove-console", // need to use specific version to be compatible with rspack's internal swc version + { + exclude: ["error"], + }, + ], + ], + }, }, }, },