Skip to content

Commit fa18392

Browse files
fix: address issue with license comments not being extracted (#1513)
* fix: address issue with license comments not being extracted * refactor: use named imports
1 parent 446b6df commit fa18392

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

rspack.config.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { type Compiler, CopyRspackPlugin, type CopyRspackPluginOptions } from "@rspack/core";
1+
import {
2+
type Compiler,
3+
CopyRspackPlugin,
4+
type CopyRspackPluginOptions,
5+
LightningCssMinimizerRspackPlugin,
6+
SwcJsMinimizerRspackPlugin
7+
} from "@rspack/core";
28
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
39
import LicensePlugin from "webpack-license-plugin";
410
import UnPluginTypia from "@ryoppippi/unplugin-typia/rspack";
@@ -217,6 +223,14 @@ const config = defineConfig((env) => ({
217223
filename: "[name]",
218224
clean: true
219225
},
226+
optimization: {
227+
minimizer: [
228+
new SwcJsMinimizerRspackPlugin({
229+
extractComments: true
230+
}),
231+
new LightningCssMinimizerRspackPlugin({})
232+
]
233+
},
220234
module: {
221235
rules: [
222236
{

0 commit comments

Comments
 (0)