From 4165afec3825fdbef165238f2d48addd715ca5ed Mon Sep 17 00:00:00 2001 From: chenjiahan <chenjiahan.jait@bytedance.com> Date: Fri, 22 Dec 2023 14:30:56 +0800 Subject: [PATCH] chore(deps): bump html-rspack-plugin v5.6.0 --- packages/compat/webpack/package.json | 2 +- .../__snapshots__/webpackConfig.test.ts.snap | 30 ++ .../__snapshots__/default.test.ts.snap | 79 ++++ packages/core/package.json | 2 +- .../tests/__snapshots__/builder.test.ts.snap | 30 ++ .../plugins/__snapshots__/html.test.ts.snap | 401 ++++++++++++++++++ .../__snapshots__/inlineChunk.test.ts.snap | 98 +++++ .../__snapshots__/default.test.ts.snap | 109 +++++ packages/plugin-assets-retry/package.json | 2 +- .../tests/__snapshots__/index.test.ts.snap | 30 ++ packages/plugin-rem/package.json | 2 +- packages/shared/package.json | 2 +- pnpm-lock.yaml | 24 +- 13 files changed, 794 insertions(+), 17 deletions(-) diff --git a/packages/compat/webpack/package.json b/packages/compat/webpack/package.json index a9fdf24d2a..884efddbe0 100644 --- a/packages/compat/webpack/package.json +++ b/packages/compat/webpack/package.json @@ -35,7 +35,7 @@ "@rsbuild/shared": "workspace:*", "fast-glob": "^3.3.1", "globby": "^11.1.0", - "html-webpack-plugin": "npm:html-rspack-plugin@5.5.7", + "html-webpack-plugin": "npm:html-rspack-plugin@5.6.0", "mini-css-extract-plugin": "2.7.6", "postcss": "8.4.31", "style-loader": "3.3.3", diff --git a/packages/compat/webpack/tests/__snapshots__/webpackConfig.test.ts.snap b/packages/compat/webpack/tests/__snapshots__/webpackConfig.test.ts.snap index 558cacd6bf..6704ff9272 100644 --- a/packages/compat/webpack/tests/__snapshots__/webpackConfig.test.ts.snap +++ b/packages/compat/webpack/tests/__snapshots__/webpackConfig.test.ts.snap @@ -26,6 +26,36 @@ exports[`webpackConfig > should allow to append and prepend plugins 1`] = ` "options": {}, }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", diff --git a/packages/compat/webpack/tests/plugins/__snapshots__/default.test.ts.snap b/packages/compat/webpack/tests/plugins/__snapshots__/default.test.ts.snap index 9665c74f6e..75bc43bdb7 100644 --- a/packages/compat/webpack/tests/plugins/__snapshots__/default.test.ts.snap +++ b/packages/compat/webpack/tests/plugins/__snapshots__/default.test.ts.snap @@ -428,6 +428,36 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` "options": {}, }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -942,6 +972,55 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ }, }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": { + "collapseWhitespace": true, + "keepClosingSlash": true, + "minifyCSS": true, + "minifyJS": { + "format": { + "ascii_only": true, + }, + "mangle": { + "safari10": true, + }, + }, + "minifyURLs": true, + "removeComments": false, + "removeEmptyAttributes": true, + "removeRedundantAttributes": true, + "removeScriptTypeAttributes": true, + "removeStyleLinkTypeAttributes": true, + "useShortDoctype": true, + }, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", diff --git a/packages/core/package.json b/packages/core/package.json index dfa0308802..4c1e9c3ce8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -63,7 +63,7 @@ "@rsbuild/shared": "workspace:*", "@rspack/core": "0.4.4", "core-js": "~3.32.2", - "html-webpack-plugin": "npm:html-rspack-plugin@5.5.7", + "html-webpack-plugin": "npm:html-rspack-plugin@5.6.0", "postcss": "8.4.31" }, "devDependencies": { diff --git a/packages/core/tests/__snapshots__/builder.test.ts.snap b/packages/core/tests/__snapshots__/builder.test.ts.snap index abaa30716f..e86ca63f44 100644 --- a/packages/core/tests/__snapshots__/builder.test.ts.snap +++ b/packages/core/tests/__snapshots__/builder.test.ts.snap @@ -629,6 +629,36 @@ exports[`should use rspack as default bundler > apply rspack correctly 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", diff --git a/packages/core/tests/plugins/__snapshots__/html.test.ts.snap b/packages/core/tests/plugins/__snapshots__/html.test.ts.snap index e35cbdbc46..43239c34b4 100644 --- a/packages/core/tests/plugins/__snapshots__/html.test.ts.snap +++ b/packages/core/tests/plugins/__snapshots__/html.test.ts.snap @@ -12,6 +12,36 @@ exports[`plugin-html > should add one tags plugin instance 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "main", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "main", + "excludeChunks": [], + "favicon": false, + "filename": "main.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "main", @@ -34,6 +64,36 @@ exports[`plugin-html > should add one tags plugin instance 1`] = ` "version": 5, }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "foo", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "foo", + "excludeChunks": [], + "favicon": false, + "filename": "foo.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "foo", @@ -99,6 +159,36 @@ exports[`plugin-html > should add tags plugin instances for each entries 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "main", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "main", + "excludeChunks": [], + "favicon": false, + "filename": "main.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "main", @@ -121,6 +211,36 @@ exports[`plugin-html > should add tags plugin instances for each entries 1`] = ` "version": 5, }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "foo", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "foo", + "excludeChunks": [], + "favicon": false, + "filename": "foo.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "foo", @@ -208,6 +328,28 @@ exports[`plugin-html > should allow to modify plugin options by tools.htmlPlugin }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": "all", + "chunksSortMode": "auto", + "compile": true, + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": true, + "meta": {}, + "minify": "auto", + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "auto", + "templateContent": false, + "templateParameters": [Function], + "title": "Webpack App", + "xhtml": false, + }, "userOptions": { "inject": true, }, @@ -234,6 +376,36 @@ exports[`plugin-html > should allow to set favicon by html.favicon option 1`] = }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": "src/favicon.ico", + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -277,6 +449,36 @@ exports[`plugin-html > should allow to set inject by html.inject option 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "body", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -319,6 +521,55 @@ exports[`plugin-html > should enable minify in production 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": { + "collapseWhitespace": true, + "keepClosingSlash": true, + "minifyCSS": true, + "minifyJS": { + "format": { + "ascii_only": true, + }, + "mangle": { + "safari10": true, + }, + }, + "minifyURLs": true, + "removeComments": false, + "removeEmptyAttributes": true, + "removeRedundantAttributes": true, + "removeScriptTypeAttributes": true, + "removeStyleLinkTypeAttributes": true, + "useShortDoctype": true, + }, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -380,6 +631,36 @@ exports[`plugin-html > should register html plugin correctly 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -422,6 +703,36 @@ exports[`plugin-html > should stop injecting <script> if inject is '() => false' }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": false, + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -464,6 +775,36 @@ exports[`plugin-html > should stop injecting <script> if inject is 'false' 1`] = }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": false, + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -509,6 +850,36 @@ exports[`plugin-html > should support multi entry 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "main", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "main", + "excludeChunks": [], + "favicon": false, + "filename": "main.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "main", @@ -531,6 +902,36 @@ exports[`plugin-html > should support multi entry 1`] = ` "version": 5, }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "foo", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "foo", + "excludeChunks": [], + "favicon": false, + "filename": "foo.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "foo", diff --git a/packages/core/tests/plugins/__snapshots__/inlineChunk.test.ts.snap b/packages/core/tests/plugins/__snapshots__/inlineChunk.test.ts.snap index 1f63d8db2e..9b5397cc2c 100644 --- a/packages/core/tests/plugins/__snapshots__/inlineChunk.test.ts.snap +++ b/packages/core/tests/plugins/__snapshots__/inlineChunk.test.ts.snap @@ -9,6 +9,55 @@ exports[`plugin-inline-chunk > should use proper plugin options when inlineScrip }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": { + "collapseWhitespace": true, + "keepClosingSlash": true, + "minifyCSS": true, + "minifyJS": { + "format": { + "ascii_only": true, + }, + "mangle": { + "safari10": true, + }, + }, + "minifyURLs": true, + "removeComments": false, + "removeEmptyAttributes": true, + "removeRedundantAttributes": true, + "removeScriptTypeAttributes": true, + "removeStyleLinkTypeAttributes": true, + "useShortDoctype": true, + }, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -82,6 +131,55 @@ exports[`plugin-inline-chunk > should use proper plugin options when inlineStyle }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": { + "collapseWhitespace": true, + "keepClosingSlash": true, + "minifyCSS": true, + "minifyJS": { + "format": { + "ascii_only": true, + }, + "mangle": { + "safari10": true, + }, + }, + "minifyURLs": true, + "removeComments": false, + "removeEmptyAttributes": true, + "removeRedundantAttributes": true, + "removeScriptTypeAttributes": true, + "removeStyleLinkTypeAttributes": true, + "useShortDoctype": true, + }, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", diff --git a/packages/core/tests/rspack-provider/plugins/__snapshots__/default.test.ts.snap b/packages/core/tests/rspack-provider/plugins/__snapshots__/default.test.ts.snap index d01e3e037b..d4e44d7a33 100644 --- a/packages/core/tests/rspack-provider/plugins/__snapshots__/default.test.ts.snap +++ b/packages/core/tests/rspack-provider/plugins/__snapshots__/default.test.ts.snap @@ -629,6 +629,36 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -1340,6 +1370,55 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": { + "collapseWhitespace": true, + "keepClosingSlash": true, + "minifyCSS": true, + "minifyJS": { + "format": { + "ascii_only": true, + }, + "mangle": { + "safari10": true, + }, + }, + "minifyURLs": true, + "removeComments": false, + "removeEmptyAttributes": true, + "removeRedundantAttributes": true, + "removeScriptTypeAttributes": true, + "removeStyleLinkTypeAttributes": true, + "useShortDoctype": true, + }, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", @@ -2503,6 +2582,36 @@ exports[`tools.rspack > should match snapshot 1`] = ` "name": "TestPlugin", }, HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", diff --git a/packages/plugin-assets-retry/package.json b/packages/plugin-assets-retry/package.json index 65167742c0..21a66ab2a0 100644 --- a/packages/plugin-assets-retry/package.json +++ b/packages/plugin-assets-retry/package.json @@ -37,7 +37,7 @@ "@rsbuild/core": "workspace:*", "@rsbuild/test-helper": "workspace:*", "@types/serialize-javascript": "^5.0.1", - "html-webpack-plugin": "npm:html-rspack-plugin@5.5.7", + "html-webpack-plugin": "npm:html-rspack-plugin@5.6.0", "terser": "5.19.2", "typescript": "^5.3.0" }, diff --git a/packages/plugin-react/tests/__snapshots__/index.test.ts.snap b/packages/plugin-react/tests/__snapshots__/index.test.ts.snap index 159f1f9c0b..61337f2ee2 100644 --- a/packages/plugin-react/tests/__snapshots__/index.test.ts.snap +++ b/packages/plugin-react/tests/__snapshots__/index.test.ts.snap @@ -667,6 +667,36 @@ exports[`plugins/react > should work with swc-loader 1`] = ` }, "plugins": [ HtmlWebpackPlugin { + "options": { + "base": false, + "cache": true, + "chunks": [ + "index", + ], + "chunksSortMode": "auto", + "compile": true, + "entryName": "index", + "excludeChunks": [], + "favicon": false, + "filename": "index.html", + "hash": false, + "inject": "head", + "meta": { + "charset": { + "charset": "UTF-8", + }, + "viewport": "width=device-width, initial-scale=1.0", + }, + "minify": false, + "publicPath": "auto", + "scriptLoading": "defer", + "showErrors": true, + "template": "<ROOT>/packages/core/static/template.html", + "templateContent": false, + "templateParameters": [Function], + "title": "Rsbuild App", + "xhtml": false, + }, "userOptions": { "chunks": [ "index", diff --git a/packages/plugin-rem/package.json b/packages/plugin-rem/package.json index b917c58352..3a800e6ceb 100644 --- a/packages/plugin-rem/package.json +++ b/packages/plugin-rem/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@rsbuild/core": "workspace:*", "@rsbuild/test-helper": "workspace:*", - "html-webpack-plugin": "npm:html-rspack-plugin@5.5.7", + "html-webpack-plugin": "npm:html-rspack-plugin@5.6.0", "typescript": "^5.3.0" }, "publishConfig": { diff --git a/packages/shared/package.json b/packages/shared/package.json index ff5ee4ebc9..d1ad35b626 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -122,7 +122,7 @@ "devDependencies": { "@types/lodash": "^4.14.200", "@types/node": "16.x", - "html-webpack-plugin": "npm:html-rspack-plugin@5.5.7", + "html-webpack-plugin": "npm:html-rspack-plugin@5.6.0", "mini-css-extract-plugin": "2.7.6", "terser": "5.19.2", "terser-webpack-plugin": "5.3.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88e1eec896..9762867943 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -580,8 +580,8 @@ importers: specifier: ^11.1.0 version: 11.1.0 html-webpack-plugin: - specifier: npm:html-rspack-plugin@5.5.7 - version: /html-rspack-plugin@5.5.7 + specifier: npm:html-rspack-plugin@5.6.0 + version: /html-rspack-plugin@5.6.0 mini-css-extract-plugin: specifier: 2.7.6 version: 2.7.6(webpack@5.89.0) @@ -626,8 +626,8 @@ importers: specifier: ~3.32.2 version: 3.32.2 html-webpack-plugin: - specifier: npm:html-rspack-plugin@5.5.7 - version: /html-rspack-plugin@5.5.7 + specifier: npm:html-rspack-plugin@5.6.0 + version: /html-rspack-plugin@5.6.0 postcss: specifier: 8.4.31 version: 8.4.31 @@ -934,8 +934,8 @@ importers: specifier: ^5.0.1 version: 5.0.4 html-webpack-plugin: - specifier: npm:html-rspack-plugin@5.5.7 - version: /html-rspack-plugin@5.5.7 + specifier: npm:html-rspack-plugin@5.6.0 + version: /html-rspack-plugin@5.6.0 terser: specifier: 5.19.2 version: 5.19.2 @@ -1140,8 +1140,8 @@ importers: specifier: workspace:* version: link:../test-helper html-webpack-plugin: - specifier: npm:html-rspack-plugin@5.5.7 - version: /html-rspack-plugin@5.5.7 + specifier: npm:html-rspack-plugin@5.6.0 + version: /html-rspack-plugin@5.6.0 typescript: specifier: ^5.3.0 version: 5.3.2 @@ -1441,8 +1441,8 @@ importers: specifier: 16.x version: 16.18.59 html-webpack-plugin: - specifier: npm:html-rspack-plugin@5.5.7 - version: /html-rspack-plugin@5.5.7 + specifier: npm:html-rspack-plugin@5.6.0 + version: /html-rspack-plugin@5.6.0 mini-css-extract-plugin: specifier: 2.7.6 version: 2.7.6(webpack@5.89.0) @@ -8708,8 +8708,8 @@ packages: resolution: {integrity: sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==} dev: true - /html-rspack-plugin@5.5.7: - resolution: {integrity: sha512-7dNAURj9XBHWoYg59F8VU6hT7J7w+od4Lr5hc/rrgN6sy6QfqVpoPqW9Qw4IGFOgit8Pul7iQp1yysBSIhOlsg==} + /html-rspack-plugin@5.6.0: + resolution: {integrity: sha512-4jrAQEEt9JCcGbeP7dFV1d42RF6IA9nYWoqK5i+rncdPPMz6eVHt1scPy9722brams7/SndzJhoIxN0Hw7T4ZA==} engines: {node: '>=10.13.0'} dependencies: lodash: 4.17.21