Skip to content

Commit 9385486

Browse files
fix: address issue with license comments not being extracted (#313)
1 parent a8f4bc8 commit 9385486

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

rspack.config.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { type Compiler, CopyRspackPlugin } from "@rspack/core";
1+
import {
2+
type Compiler,
3+
CopyRspackPlugin,
4+
LightningCssMinimizerRspackPlugin,
5+
SwcJsMinimizerRspackPlugin
6+
} from "@rspack/core";
27
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
38
import { defineConfig } from "@rspack/cli";
49
import { exec } from "child_process";
@@ -99,6 +104,14 @@ const config = defineConfig((env) => ({
99104
filename: "[name]",
100105
clean: true
101106
},
107+
optimization: {
108+
minimizer: [
109+
new SwcJsMinimizerRspackPlugin({
110+
extractComments: true
111+
}),
112+
new LightningCssMinimizerRspackPlugin({})
113+
]
114+
},
102115
module: {
103116
rules: [
104117
{

0 commit comments

Comments
 (0)