@modern-js/builder 3.10.1 → 3.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,7 +84,7 @@ const pluginHtmlMinifierTerser = ()=>({
|
|
|
84
84
|
setup (api) {
|
|
85
85
|
api.modifyBundlerChain(async (chain, { isProd, environment })=>{
|
|
86
86
|
const { output, tools: { htmlPlugin } } = environment.config;
|
|
87
|
-
|
|
87
|
+
if (!isProd || false === output.minify || false === htmlPlugin) return;
|
|
88
88
|
const { minify } = await import("html-minifier-terser");
|
|
89
89
|
const pluginRecord = chain.plugins.entries();
|
|
90
90
|
const minifyOptions = getMinifyOptions(environment.config);
|
|
@@ -95,7 +95,7 @@ const pluginHtmlMinifierTerser = ()=>({
|
|
|
95
95
|
const name = item?.name || item.constructor?.name;
|
|
96
96
|
return 'HtmlRspackPlugin' === name;
|
|
97
97
|
});
|
|
98
|
-
if (isHtmlRspackPlugin
|
|
98
|
+
if (isHtmlRspackPlugin) {
|
|
99
99
|
chain.plugin(id).tap((options)=>{
|
|
100
100
|
if (!options.length) return options;
|
|
101
101
|
const userMinifyOption = options[0].minify;
|
|
@@ -52,7 +52,7 @@ const pluginHtmlMinifierTerser = ()=>({
|
|
|
52
52
|
setup (api) {
|
|
53
53
|
api.modifyBundlerChain(async (chain, { isProd, environment })=>{
|
|
54
54
|
const { output, tools: { htmlPlugin } } = environment.config;
|
|
55
|
-
|
|
55
|
+
if (!isProd || false === output.minify || false === htmlPlugin) return;
|
|
56
56
|
const { minify } = await import("html-minifier-terser");
|
|
57
57
|
const pluginRecord = chain.plugins.entries();
|
|
58
58
|
const minifyOptions = getMinifyOptions(environment.config);
|
|
@@ -63,7 +63,7 @@ const pluginHtmlMinifierTerser = ()=>({
|
|
|
63
63
|
const name = item?.name || item.constructor?.name;
|
|
64
64
|
return 'HtmlRspackPlugin' === name;
|
|
65
65
|
});
|
|
66
|
-
if (isHtmlRspackPlugin
|
|
66
|
+
if (isHtmlRspackPlugin) {
|
|
67
67
|
chain.plugin(id).tap((options)=>{
|
|
68
68
|
if (!options.length) return options;
|
|
69
69
|
const userMinifyOption = options[0].minify;
|
|
@@ -53,7 +53,7 @@ const pluginHtmlMinifierTerser = ()=>({
|
|
|
53
53
|
setup (api) {
|
|
54
54
|
api.modifyBundlerChain(async (chain, { isProd, environment })=>{
|
|
55
55
|
const { output, tools: { htmlPlugin } } = environment.config;
|
|
56
|
-
|
|
56
|
+
if (!isProd || false === output.minify || false === htmlPlugin) return;
|
|
57
57
|
const { minify } = await import("html-minifier-terser");
|
|
58
58
|
const pluginRecord = chain.plugins.entries();
|
|
59
59
|
const minifyOptions = getMinifyOptions(environment.config);
|
|
@@ -64,7 +64,7 @@ const pluginHtmlMinifierTerser = ()=>({
|
|
|
64
64
|
const name = item?.name || item.constructor?.name;
|
|
65
65
|
return 'HtmlRspackPlugin' === name;
|
|
66
66
|
});
|
|
67
|
-
if (isHtmlRspackPlugin
|
|
67
|
+
if (isHtmlRspackPlugin) {
|
|
68
68
|
chain.plugin(id).tap((options)=>{
|
|
69
69
|
if (!options.length) return options;
|
|
70
70
|
const userMinifyOption = options[0].minify;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/builder",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.3",
|
|
4
4
|
"description": "A builder for Modern.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"rsbuild-plugin-rsc": "0.1.1",
|
|
58
58
|
"rspack-manifest-plugin": "5.2.2",
|
|
59
59
|
"ts-deepmerge": "8.0.0",
|
|
60
|
-
"@modern-js/utils": "3.10.
|
|
60
|
+
"@modern-js/utils": "3.10.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/html-minifier-terser": "^7.0.2",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"react": "^19.3.1",
|
|
66
66
|
"terser": "^5.51.2",
|
|
67
67
|
"typescript": "^5.3.0",
|
|
68
|
-
"@modern-js/rslib": "
|
|
69
|
-
"@modern-js/types": "3.10.
|
|
70
|
-
"@scripts/rstest-config": "2.66.
|
|
68
|
+
"@modern-js/rslib": "3.10.3",
|
|
69
|
+
"@modern-js/types": "3.10.3",
|
|
70
|
+
"@scripts/rstest-config": "2.66.2"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public",
|