We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8f4bc8 commit 9385486Copy full SHA for 9385486
rspack.config.ts
@@ -1,4 +1,9 @@
1
-import { type Compiler, CopyRspackPlugin } from "@rspack/core";
+import {
2
+ type Compiler,
3
+ CopyRspackPlugin,
4
+ LightningCssMinimizerRspackPlugin,
5
+ SwcJsMinimizerRspackPlugin
6
+} from "@rspack/core";
7
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
8
import { defineConfig } from "@rspack/cli";
9
import { exec } from "child_process";
@@ -99,6 +104,14 @@ const config = defineConfig((env) => ({
99
104
filename: "[name]",
100
105
clean: true
101
106
},
107
+ optimization: {
108
+ minimizer: [
109
+ new SwcJsMinimizerRspackPlugin({
110
+ extractComments: true
111
+ }),
112
+ new LightningCssMinimizerRspackPlugin({})
113
+ ]
114
+ },
102
115
module: {
103
116
rules: [
117
{
0 commit comments