@modern-js/uni-builder 2.60.0 → 2.60.2

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.
@@ -40,13 +40,13 @@ const transformDevSetupMiddlewares = (seuptMiddlewares) => {
40
40
  const transformToRsbuildServerOptions = (dev, devServer) => {
41
41
  var _newDevServerConfig_devMiddleware;
42
42
  const { port = 8080, host, https, startUrl, beforeStartUrl, setupMiddlewares, ...devConfig } = dev;
43
- var _dev_hmr;
43
+ var _dev_hmr, _dev_liveReload;
44
44
  const newDevServerConfig = (0, import_utils.applyOptionsChain)({
45
45
  devMiddleware: {
46
46
  writeToDisk: (file) => !file.includes(".hot-update.")
47
47
  },
48
48
  hot: (_dev_hmr = dev === null || dev === void 0 ? void 0 : dev.hmr) !== null && _dev_hmr !== void 0 ? _dev_hmr : true,
49
- liveReload: true,
49
+ liveReload: (_dev_liveReload = dev === null || dev === void 0 ? void 0 : dev.liveReload) !== null && _dev_liveReload !== void 0 ? _dev_liveReload : true,
50
50
  client: {
51
51
  path: "/webpack-hmr",
52
52
  overlay: false,
@@ -211,19 +211,21 @@ async function parseCommonConfig(uniBuilderConfig, options) {
211
211
  }
212
212
  var _tools;
213
213
  (_tools = (_extraConfig1 = extraConfig).tools) !== null && _tools !== void 0 ? _tools : _extraConfig1.tools = {};
214
- extraConfig.tools.htmlPlugin = (config) => {
215
- if (typeof config.templateParameters === "function") {
216
- const originFn = config.templateParameters;
217
- config.templateParameters = (...args) => {
218
- const res = originFn(...args);
219
- return {
220
- title: config.title,
221
- meta: void 0,
222
- ...res
214
+ if (htmlPlugin !== false) {
215
+ extraConfig.tools.htmlPlugin = (config) => {
216
+ if (typeof config.templateParameters === "function") {
217
+ const originFn = config.templateParameters;
218
+ config.templateParameters = (...args) => {
219
+ const res = originFn(...args);
220
+ return {
221
+ title: config.title,
222
+ meta: void 0,
223
+ ...res
224
+ };
223
225
  };
224
- };
225
- }
226
- };
226
+ }
227
+ };
228
+ }
227
229
  const { dev: RsbuildDev, server } = (0, import_devServer.transformToRsbuildServerOptions)(dev || {}, devServer || {});
228
230
  rsbuildConfig.server = removeUndefinedKey(server);
229
231
  rsbuildConfig.dev = removeUndefinedKey(RsbuildDev);
package/dist/types.d.ts CHANGED
@@ -172,7 +172,7 @@ export type UniBuilderExtraConfig = {
172
172
  };
173
173
  output?: {
174
174
  /**
175
- * Whether to disable code minification in production build.
175
+ * @deprecated use `output.minify` instead
176
176
  */
177
177
  disableMinimize?: boolean;
178
178
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/uni-builder",
3
- "version": "2.60.0",
3
+ "version": "2.60.2",
4
4
  "description": "Unified builder for Modern.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,24 +26,24 @@
26
26
  "@babel/preset-react": "^7.22.15",
27
27
  "@babel/types": "^7.24.7",
28
28
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
29
- "@rsbuild/core": "1.0.2",
29
+ "@rsbuild/core": "1.0.7",
30
30
  "@rsbuild/plugin-assets-retry": "1.0.1",
31
31
  "@rsbuild/plugin-babel": "1.0.1",
32
32
  "@rsbuild/plugin-check-syntax": "1.0.1",
33
33
  "@rsbuild/plugin-css-minimizer": "1.0.2",
34
34
  "@rsbuild/plugin-less": "1.0.1",
35
35
  "@rsbuild/plugin-pug": "1.0.2",
36
- "@rsbuild/plugin-react": "1.0.1",
36
+ "@rsbuild/plugin-react": "1.0.2",
37
37
  "@rsbuild/plugin-rem": "1.0.1",
38
38
  "@rsbuild/plugin-sass": "1.0.1",
39
39
  "@rsbuild/plugin-source-build": "1.0.1",
40
40
  "@rsbuild/plugin-styled-components": "1.0.1",
41
- "@rsbuild/plugin-svgr": "1.0.1",
41
+ "@rsbuild/plugin-svgr": "1.0.2",
42
42
  "@rsbuild/plugin-toml": "1.0.1",
43
43
  "@rsbuild/plugin-type-check": "1.0.1",
44
44
  "@rsbuild/plugin-typed-css-modules": "1.0.2",
45
45
  "@rsbuild/plugin-yaml": "1.0.2",
46
- "@rsbuild/webpack": "1.0.2",
46
+ "@rsbuild/webpack": "1.0.7",
47
47
  "@swc/helpers": "0.5.13",
48
48
  "autoprefixer": "10.4.19",
49
49
  "babel-loader": "9.1.3",
@@ -72,19 +72,19 @@
72
72
  "ts-loader": "9.4.4",
73
73
  "webpack": "^5.94.0",
74
74
  "webpack-subresource-integrity": "5.1.0",
75
- "@modern-js/babel-preset": "2.60.0",
76
- "@modern-js/utils": "2.60.0"
75
+ "@modern-js/babel-preset": "2.60.2",
76
+ "@modern-js/utils": "2.60.2"
77
77
  },
78
78
  "devDependencies": {
79
- "@rsbuild/plugin-webpack-swc": "1.0.2",
79
+ "@rsbuild/plugin-webpack-swc": "1.0.3",
80
80
  "@types/html-minifier-terser": "^7.0.2",
81
81
  "@types/lodash": "^4.14.202",
82
82
  "react": "^18.2.0",
83
83
  "react-dom": "^18.2.0",
84
84
  "terser": "^5.31.1",
85
85
  "typescript": "^5.3.0",
86
- "@scripts/build": "2.60.0",
87
- "@scripts/vitest-config": "2.60.0"
86
+ "@scripts/build": "2.60.2",
87
+ "@scripts/vitest-config": "2.60.2"
88
88
  },
89
89
  "publishConfig": {
90
90
  "access": "public",