@unpackjs/core 4.2.1 → 4.2.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.
@@ -1,22 +1,22 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 5788: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 3479: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(9410);
5
+ const loader = __nccwpck_require__(7225);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(4643).defaultGetLocalIdent;
8
+ __nccwpck_require__(1476).defaultGetLocalIdent;
9
9
  },
10
- 9410: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 7225: (__unused_webpack_module, exports, __nccwpck_require__) => {
11
11
  "use strict";
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports["default"] = loader;
14
14
  var _postcss = _interopRequireDefault(__nccwpck_require__(1940));
15
15
  var _package = _interopRequireDefault(__nccwpck_require__(444));
16
16
  var _semver = __nccwpck_require__(5200);
17
- var _options = _interopRequireDefault(__nccwpck_require__(2204));
18
- var _plugins = __nccwpck_require__(3153);
19
- var _utils = __nccwpck_require__(4643);
17
+ var _options = _interopRequireDefault(__nccwpck_require__(4799));
18
+ var _plugins = __nccwpck_require__(9350);
19
+ var _utils = __nccwpck_require__(1476);
20
20
  function _interopRequireDefault(e) {
21
21
  return e && e.__esModule ? e : { default: e };
22
22
  }
@@ -243,7 +243,7 @@
243
243
  callback(null, `${importCode}${moduleCode}${exportCode}`);
244
244
  }
245
245
  },
246
- 3153: (__unused_webpack_module, exports, __nccwpck_require__) => {
246
+ 9350: (__unused_webpack_module, exports, __nccwpck_require__) => {
247
247
  "use strict";
248
248
  Object.defineProperty(exports, "__esModule", { value: true });
249
249
  Object.defineProperty(exports, "icssParser", {
@@ -265,22 +265,22 @@
265
265
  },
266
266
  });
267
267
  var _postcssImportParser = _interopRequireDefault(
268
- __nccwpck_require__(8170),
268
+ __nccwpck_require__(8845),
269
269
  );
270
270
  var _postcssIcssParser = _interopRequireDefault(
271
- __nccwpck_require__(6451),
271
+ __nccwpck_require__(4988),
272
272
  );
273
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6246));
273
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4555));
274
274
  function _interopRequireDefault(e) {
275
275
  return e && e.__esModule ? e : { default: e };
276
276
  }
277
277
  },
278
- 6451: (__unused_webpack_module, exports, __nccwpck_require__) => {
278
+ 4988: (__unused_webpack_module, exports, __nccwpck_require__) => {
279
279
  "use strict";
280
280
  Object.defineProperty(exports, "__esModule", { value: true });
281
281
  exports["default"] = void 0;
282
282
  var _icssUtils = __nccwpck_require__(229);
283
- var _utils = __nccwpck_require__(4643);
283
+ var _utils = __nccwpck_require__(1476);
284
284
  const plugin = (options = {}) => ({
285
285
  postcssPlugin: "postcss-icss-parser",
286
286
  async OnceExit(root) {
@@ -379,14 +379,14 @@
379
379
  plugin.postcss = true;
380
380
  var _default = (exports["default"] = plugin);
381
381
  },
382
- 8170: (__unused_webpack_module, exports, __nccwpck_require__) => {
382
+ 8845: (__unused_webpack_module, exports, __nccwpck_require__) => {
383
383
  "use strict";
384
384
  Object.defineProperty(exports, "__esModule", { value: true });
385
385
  exports["default"] = void 0;
386
386
  var _postcssValueParser = _interopRequireDefault(
387
387
  __nccwpck_require__(5245),
388
388
  );
389
- var _utils = __nccwpck_require__(4643);
389
+ var _utils = __nccwpck_require__(1476);
390
390
  function _interopRequireDefault(e) {
391
391
  return e && e.__esModule ? e : { default: e };
392
392
  }
@@ -691,14 +691,14 @@
691
691
  plugin.postcss = true;
692
692
  var _default = (exports["default"] = plugin);
693
693
  },
694
- 6246: (__unused_webpack_module, exports, __nccwpck_require__) => {
694
+ 4555: (__unused_webpack_module, exports, __nccwpck_require__) => {
695
695
  "use strict";
696
696
  Object.defineProperty(exports, "__esModule", { value: true });
697
697
  exports["default"] = void 0;
698
698
  var _postcssValueParser = _interopRequireDefault(
699
699
  __nccwpck_require__(5245),
700
700
  );
701
- var _utils = __nccwpck_require__(4643);
701
+ var _utils = __nccwpck_require__(1476);
702
702
  function _interopRequireDefault(e) {
703
703
  return e && e.__esModule ? e : { default: e };
704
704
  }
@@ -1041,7 +1041,7 @@
1041
1041
  plugin.postcss = true;
1042
1042
  var _default = (exports["default"] = plugin);
1043
1043
  },
1044
- 4643: (__unused_webpack_module, exports, __nccwpck_require__) => {
1044
+ 1476: (__unused_webpack_module, exports, __nccwpck_require__) => {
1045
1045
  "use strict";
1046
1046
  Object.defineProperty(exports, "__esModule", { value: true });
1047
1047
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -8095,7 +8095,7 @@
8095
8095
  "use strict";
8096
8096
  module.exports = require("util");
8097
8097
  },
8098
- 2204: (module) => {
8098
+ 4799: (module) => {
8099
8099
  "use strict";
8100
8100
  module.exports = JSON.parse(
8101
8101
  '{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
@@ -8130,6 +8130,6 @@
8130
8130
  }
8131
8131
  if (typeof __nccwpck_require__ !== "undefined")
8132
8132
  __nccwpck_require__.ab = __dirname + "/";
8133
- var __webpack_exports__ = __nccwpck_require__(5788);
8133
+ var __webpack_exports__ = __nccwpck_require__(3479);
8134
8134
  module.exports = __webpack_exports__;
8135
8135
  })();
@@ -1,16 +1,16 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 265: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(939)["default"];
4
+ 886: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(508)["default"];
6
6
  },
7
- 939: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 508: (__unused_webpack_module, exports, __nccwpck_require__) => {
8
8
  var __webpack_unused_export__;
9
9
  __webpack_unused_export__ = { value: true };
10
10
  exports["default"] = void 0;
11
11
  var _path = _interopRequireDefault(__nccwpck_require__(928));
12
- var _options = _interopRequireDefault(__nccwpck_require__(601));
13
- var _utils = __nccwpck_require__(174);
12
+ var _options = _interopRequireDefault(__nccwpck_require__(134));
13
+ var _utils = __nccwpck_require__(13);
14
14
  function _interopRequireDefault(e) {
15
15
  return e && e.__esModule ? e : { default: e };
16
16
  }
@@ -112,7 +112,7 @@
112
112
  }
113
113
  var _default = (exports["default"] = lessLoader);
114
114
  },
115
- 174: (__unused_webpack_module, exports, __nccwpck_require__) => {
115
+ 13: (__unused_webpack_module, exports, __nccwpck_require__) => {
116
116
  Object.defineProperty(exports, "__esModule", { value: true });
117
117
  exports.errorFactory = errorFactory;
118
118
  exports.getLessImplementation = getLessImplementation;
@@ -312,7 +312,7 @@
312
312
  928: (module) => {
313
313
  module.exports = require("path");
314
314
  },
315
- 601: (module) => {
315
+ 134: (module) => {
316
316
  module.exports = JSON.parse(
317
317
  '{"title":"Less Loader options","type":"object","properties":{"lessOptions":{"description":"Options to pass through to `Less`.","link":"https://github.com/webpack-contrib/less-loader#lessoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Less` code to the actual entry file.","link":"https://github.com/webpack-contrib/less-loader#additionalData","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/less-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/less-loader#webpackimporter","anyOf":[{"type":"boolean"},{"type":"string","enum":["only"]}]},"implementation":{"description":"The implementation of the `Less` to be used.","link":"https://github.com/webpack-contrib/less-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"lessLogAsWarnOrErr":{"description":"Less warnings and errors will be webpack warnings or errors.","link":"https://github.com/webpack-contrib/less-loader#lesslogaswarnorerr","type":"boolean"}},"additionalProperties":false}',
318
318
  );
@@ -340,6 +340,6 @@
340
340
  }
341
341
  if (typeof __nccwpck_require__ !== "undefined")
342
342
  __nccwpck_require__.ab = __dirname + "/";
343
- var __webpack_exports__ = __nccwpck_require__(265);
343
+ var __webpack_exports__ = __nccwpck_require__(886);
344
344
  module.exports = __webpack_exports__;
345
345
  })();
@@ -5319,19 +5319,19 @@
5319
5319
  module.exports = createColors();
5320
5320
  module.exports.createColors = createColors;
5321
5321
  },
5322
- 6725: (module, __unused_webpack_exports, __nccwpck_require__) => {
5322
+ 4456: (module, __unused_webpack_exports, __nccwpck_require__) => {
5323
5323
  "use strict";
5324
- module.exports = __nccwpck_require__(3103)["default"];
5324
+ module.exports = __nccwpck_require__(86)["default"];
5325
5325
  },
5326
- 3103: (__unused_webpack_module, exports, __nccwpck_require__) => {
5326
+ 86: (__unused_webpack_module, exports, __nccwpck_require__) => {
5327
5327
  "use strict";
5328
5328
  var __webpack_unused_export__;
5329
5329
  __webpack_unused_export__ = { value: true };
5330
5330
  exports["default"] = loader;
5331
5331
  var _nodePath = _interopRequireDefault(__nccwpck_require__(6760));
5332
5332
  var _package = _interopRequireDefault(__nccwpck_require__(444));
5333
- var _options = _interopRequireDefault(__nccwpck_require__(8699));
5334
- var _utils = __nccwpck_require__(8458);
5333
+ var _options = _interopRequireDefault(__nccwpck_require__(3358));
5334
+ var _utils = __nccwpck_require__(7543);
5335
5335
  function _interopRequireDefault(e) {
5336
5336
  return e && e.__esModule ? e : { default: e };
5337
5337
  }
@@ -5509,7 +5509,7 @@
5509
5509
  callback(null, result.css, map, { ast });
5510
5510
  }
5511
5511
  },
5512
- 8458: (module, exports, __nccwpck_require__) => {
5512
+ 7543: (module, exports, __nccwpck_require__) => {
5513
5513
  "use strict";
5514
5514
  module = __nccwpck_require__.nmd(module);
5515
5515
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -6617,7 +6617,7 @@
6617
6617
  return keywords.has(word);
6618
6618
  }
6619
6619
  },
6620
- 8699: (module) => {
6620
+ 3358: (module) => {
6621
6621
  "use strict";
6622
6622
  module.exports = JSON.parse(
6623
6623
  '{"title":"PostCSS Loader options","type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","link":"https://github.com/webpack-contrib/postcss-loader#postcssOptions","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS config path.","link":"https://github.com/webpack-contrib/postcss-loader#config","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\'.","link":"https://github.com/webpack-contrib/postcss-loader#execute","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/postcss-loader#sourcemap","type":"boolean"},"implementation":{"description":"The implementation of postcss to use, instead of the locally installed version","link":"https://github.com/webpack-contrib/postcss-loader#implementation","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
@@ -6727,6 +6727,6 @@
6727
6727
  })();
6728
6728
  if (typeof __nccwpck_require__ !== "undefined")
6729
6729
  __nccwpck_require__.ab = __dirname + "/";
6730
- var __webpack_exports__ = __nccwpck_require__(6725);
6730
+ var __webpack_exports__ = __nccwpck_require__(4456);
6731
6731
  module.exports = __webpack_exports__;
6732
6732
  })();
@@ -4795,19 +4795,19 @@
4795
4795
  }
4796
4796
  });
4797
4797
  },
4798
- 477: (module, __unused_webpack_exports, __nccwpck_require__) => {
4798
+ 346: (module, __unused_webpack_exports, __nccwpck_require__) => {
4799
4799
  "use strict";
4800
- const loader = __nccwpck_require__(431);
4800
+ const loader = __nccwpck_require__(24);
4801
4801
  module.exports = loader.default;
4802
4802
  },
4803
- 431: (__unused_webpack_module, exports, __nccwpck_require__) => {
4803
+ 24: (__unused_webpack_module, exports, __nccwpck_require__) => {
4804
4804
  "use strict";
4805
4805
  Object.defineProperty(exports, "__esModule", { value: true });
4806
4806
  exports["default"] = void 0;
4807
4807
  var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
4808
4808
  var _nodeUrl = _interopRequireDefault(__nccwpck_require__(136));
4809
- var _options = _interopRequireDefault(__nccwpck_require__(985));
4810
- var _utils = __nccwpck_require__(522);
4809
+ var _options = _interopRequireDefault(__nccwpck_require__(990));
4810
+ var _utils = __nccwpck_require__(137);
4811
4811
  function _interopRequireDefault(e) {
4812
4812
  return e && e.__esModule ? e : { default: e };
4813
4813
  }
@@ -4914,7 +4914,7 @@
4914
4914
  }
4915
4915
  var _default = (exports["default"] = loader);
4916
4916
  },
4917
- 522: (__unused_webpack_module, exports, __nccwpck_require__) => {
4917
+ 137: (__unused_webpack_module, exports, __nccwpck_require__) => {
4918
4918
  "use strict";
4919
4919
  Object.defineProperty(exports, "__esModule", { value: true });
4920
4920
  exports.errorFactory = errorFactory;
@@ -5568,7 +5568,7 @@
5568
5568
  "use strict";
5569
5569
  module.exports = require("sass");
5570
5570
  },
5571
- 985: (module) => {
5571
+ 990: (module) => {
5572
5572
  "use strict";
5573
5573
  module.exports = JSON.parse(
5574
5574
  '{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack/sass-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"api":{"description":"Switch between old and modern API for `sass` (`Dart Sass`) and `Sass Embedded` implementations.","link":"https://github.com/webpack/sass-loader#sassoptions","enum":["legacy","modern","modern-compiler"]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack/sass-loader#sassoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file.","link":"https://github.com/webpack/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}',
@@ -5598,6 +5598,6 @@
5598
5598
  }
5599
5599
  if (typeof __nccwpck_require__ !== "undefined")
5600
5600
  __nccwpck_require__.ab = __dirname + "/";
5601
- var __webpack_exports__ = __nccwpck_require__(477);
5601
+ var __webpack_exports__ = __nccwpck_require__(346);
5602
5602
  module.exports = __webpack_exports__;
5603
5603
  })();
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ import { Compilation, rspack } from "@rspack/core";
10
10
  import cac from "cac";
11
11
  import node_fs from "node:fs";
12
12
  import node_readline from "node:readline";
13
+ import { createHash } from "node:crypto";
13
14
  import node_os, { platform } from "node:os";
14
15
  import portfinder from "portfinder";
15
16
  import { glob as external_tinyglobby_glob, globSync } from "tinyglobby";
@@ -17,7 +18,6 @@ import { format, promisify } from "node:util";
17
18
  import { TraceMap, originalPositionFor } from "@jridgewell/trace-mapping";
18
19
  import { parse } from "stacktrace-parser";
19
20
  import node_zlib from "node:zlib";
20
- import { createHash } from "node:crypto";
21
21
  import magic_string from "magic-string";
22
22
  import { expand } from "dotenv-expand";
23
23
  import node_assert from "node:assert";
@@ -122,7 +122,7 @@ let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULE
122
122
  </body>
123
123
  </html>`, JS_REGEX = /\.[jt]s$/, JSX_REGEX = /\.[jt]sx$/, SCRIPT_REGEX = /\.[jt]sx?$/;
124
124
  var utils_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
125
- let { merge: utils_mergeConfig } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
125
+ let { merge: mergeConfig } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
126
126
  process.env.NODE_ENV = env;
127
127
  }, setDevServer = (isDevServer)=>{
128
128
  process.env.DEV_SERVER = isDevServer ? 'true' : 'false';
@@ -169,7 +169,16 @@ function getTime() {
169
169
  let now = new Date(), hours = String(now.getHours()).padStart(2, '0'), minutes = String(now.getMinutes()).padStart(2, '0'), seconds = String(now.getSeconds()).padStart(2, '0');
170
170
  return `${hours}:${minutes}:${seconds}`;
171
171
  }
172
- let debounce = (fn, delay)=>{
172
+ let getFilesContentHash = (filePaths)=>{
173
+ let normalizedPaths = [
174
+ ...filePaths
175
+ ].filter(Boolean).map((filePath)=>node_path.resolve(filePath)).sort(), hash = createHash('sha256');
176
+ for (let filePath of normalizedPaths.filter((filePath)=>node_fs.existsSync(filePath))){
177
+ let content = node_fs.readFileSync(filePath);
178
+ hash.update(content);
179
+ }
180
+ return hash.digest('hex');
181
+ }, debounce = (fn, delay)=>{
173
182
  let timer = null;
174
183
  return (...args)=>{
175
184
  clearTimeout(timer), timer = setTimeout(()=>{
@@ -502,26 +511,69 @@ async function getCompressedSize(content) {
502
511
  let COMPRESSIBLE_REGEX = /\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest|md)$/i, GLOB_MAGIC_RE = /[*?[\]{}()!@+|]/, normalizeBaseDir = (raw)=>{
503
512
  let normalized = raw.replace(/\\/g, '/');
504
513
  return normalized && '.' !== normalized ? (normalized.startsWith('/') ? normalized = normalized.replace(/\/{2,}/g, '/') : normalized.startsWith('.') || (normalized = `./${normalized}`), (normalized = normalized.replace(/\/{2,}/g, '/')).endsWith('/') && (normalized = normalized.slice(0, -1)), '.' === normalized ? './' : normalized) : './';
505
- }, toRegexLiteral = (source)=>`/${source.replace(/\\?\//g, (value)=>'/' === value ? '\\/' : value)}/`, parseGlob = (pattern)=>{
514
+ }, toRegexLiteral = (source)=>`/${source.replace(/\\?\//g, (value)=>'/' === value ? '\\/' : value)}/`, buildInnerRegExpSource = (glob)=>{
515
+ let source = glob.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
516
+ return (source = (source = source.replace(/\\\*\\\*/g, '.*')).replace(/\\\*/g, '[^/]*')).replace(/\\\?/g, '[^/]');
517
+ }, parseGlob = (pattern)=>{
506
518
  let normalized = pattern.replace(/\\/g, '/'), isAbs = normalized.startsWith('/'), normalizedForParse = isAbs ? `.${normalized}` : normalized, globIndex = normalizedForParse.search(GLOB_MAGIC_RE), slashIndex = -1 === globIndex ? normalizedForParse.lastIndexOf('/') : normalizedForParse.lastIndexOf('/', globIndex), baseDirRaw = slashIndex >= 0 ? normalizedForParse.slice(0, slashIndex) : '.', globPart = slashIndex >= 0 ? normalizedForParse.slice(slashIndex + 1) : normalizedForParse, recursive = normalizedForParse.includes('**'), baseDir = isAbs ? normalizeBaseDir(`/${baseDirRaw.replace(/^\.\//, '')}`) : normalizeBaseDir(baseDirRaw);
507
519
  return {
508
520
  baseDir,
509
521
  regExpSource: ((glob)=>{
510
522
  let expansions;
511
523
  if (!glob) return '^\\.\\/.*$';
512
- let { replaced, expansions: expansions1 } = (expansions = [], {
513
- replaced: glob.replace(/\{([^}]+)\}/g, (_, inner)=>(expansions.push(inner), `__BRACE_${expansions.length - 1}__`)),
524
+ let { replaced: replacedExtGlob, negations } = ((glob)=>{
525
+ let negations = [], out = '';
526
+ for(let i = 0; i < glob.length; i++){
527
+ let ch = glob[i];
528
+ if ('!' !== ch || '(' !== glob[i + 1]) {
529
+ out += ch;
530
+ continue;
531
+ }
532
+ let j = i + 2, depth = 1;
533
+ for(; j < glob.length; j++){
534
+ let cj = glob[j];
535
+ if ('(' === cj) depth++;
536
+ else if (')' === cj && 0 == --depth) break;
537
+ }
538
+ if (0 !== depth) {
539
+ out += ch;
540
+ continue;
541
+ }
542
+ let inner = glob.slice(i + 2, j);
543
+ negations.push(inner), out += `__EXT_NEG_${negations.length - 1}__`, i = j;
544
+ }
545
+ return {
546
+ replaced: out,
547
+ negations
548
+ };
549
+ })(glob), { replaced, expansions: expansions1 } = (expansions = [], {
550
+ replaced: replacedExtGlob.replace(/\{([^}]+)\}/g, (_, inner)=>(expansions.push(inner), `__BRACE_${expansions.length - 1}__`)),
514
551
  expansions
515
552
  }), source = replaced.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
516
- return source = (source = (source = (source = (source = (source = source.replace(/__BRACE_(\d+)__/g, (_, index)=>{
553
+ return source = (source = (source = (source = (source = (source = (source = source.replace(/__BRACE_(\d+)__/g, (_, index)=>{
517
554
  let parts = (expansions1[Number(index)] || '').split(',').map((part)=>part.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
518
555
  return `(${parts.join('|')})`;
556
+ })).replace(/__EXT_NEG_(\d+)__/g, (_, index)=>{
557
+ let parts = (negations[Number(index)] || '').split('|').map((part)=>part.trim()).filter(Boolean).map(buildInnerRegExpSource);
558
+ return parts.length ? `(?!(?:${parts.join('|')}))[^/]*` : '[^/]*';
519
559
  })).replace(/\\\(([^)]+)\\\)\\\?/g, (_, inner)=>`(?:${inner})?`)).replace(/\\\*\\\*\\\//g, '(?:.*\\/)?')).replace(/\\\*\\\*/g, '.*')).replace(/\\\*/g, '[^/]*')).replace(/\\\?/g, '[^/]'), `^(?:\\.\\/)?${source}$`;
520
560
  })(globPart),
521
561
  recursive,
522
562
  publicPrefix: './' === baseDir ? './' : baseDir
523
563
  };
524
- }, hasEager = (rawOptions)=>!!rawOptions && /eager\s*:\s*true/.test(rawOptions), SPECIAL_NO_ENTRY_DEPS = [
564
+ }, hasEager = (rawOptions)=>!!rawOptions && /eager\s*:\s*true/.test(rawOptions), normalizeGlobByAliases = (pattern, options)=>{
565
+ let trimmed = pattern.trim();
566
+ if (!trimmed || trimmed.startsWith('/') || trimmed.startsWith('.')) return trimmed;
567
+ for (let [rawKey, rawTarget] of Object.entries(options.alias).filter(([key])=>key && '/' !== key).sort((a, b)=>b[0].length - a[0].length)){
568
+ let key = rawKey.endsWith('/') ? rawKey.slice(0, -1) : rawKey;
569
+ if (!key || !trimmed.startsWith(`${key}/`)) continue;
570
+ let targetAbs = node_path.isAbsolute(rawTarget) ? rawTarget : node_path.resolve(options.root, rawTarget), rel = node_path.relative(options.root, targetAbs).replace(/\\/g, '/');
571
+ if (rel.startsWith('..')) continue;
572
+ let publicBase = `/${rel}`.replace(/\/{2,}/g, '/').replace(/\/$/, ''), rest = trimmed.slice(key.length);
573
+ return `${publicBase}${rest}`.replace(/\/{2,}/g, '/');
574
+ }
575
+ return trimmed;
576
+ }, SPECIAL_NO_ENTRY_DEPS = [
525
577
  '@iconify-icons/material-symbols'
526
578
  ], FRAMEWORKS = [
527
579
  'react',
@@ -564,7 +616,7 @@ let COMPRESSIBLE_REGEX = /\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest|
564
616
  'uno.config.ts',
565
617
  'uno.config.js',
566
618
  'uno.config.mts'
567
- ], LAYER_MARK_ALL = '__ALL__', HASH_PLACEHOLDER_RE = /#--unocss-hash--\s*\{\s*content\s*:\s*\\*"([^\\"]+)\\*";?\s*\}/g, LAYER_PLACEHOLDER_RE = /#--unocss--\s*\{\s*layer\s*:\s*(.+?)\s*(?:;\s*escape-view\s*:\s*(.+?)\s*)?;?\s*\}/g, SKIP_START_COMMENT = '@unocss-skip-start', SKIP_END_COMMENT = '@unocss-skip-end', SKIP_COMMENT_RE = RegExp(`(?://\\s*?${SKIP_START_COMMENT}\\s*?|/\\*\\s*?${SKIP_START_COMMENT}\\s*?\\*/|<!--\\s*?${SKIP_START_COMMENT}\\s*?-->)[\\s\\S]*?(?://\\s*?${SKIP_END_COMMENT}\\s*?|/\\*\\s*?${SKIP_END_COMMENT}\\s*?\\*/|<!--\\s*?${SKIP_END_COMMENT}\\s*?-->)`, 'g'), getCssEscaperForJsContent = (view)=>{
619
+ ], LAYER_MARK_ALL = '__ALL__', HASH_PLACEHOLDER_RE = /#--unocss-hash--\s*\{\s*content\s*:\s*\\*"([^\\"]+)\\*";?\s*\}/g, LAYER_PLACEHOLDER_RE = /#--unocss--\s*\{\s*layer\s*:\s*(.+?)\s*(?:;\s*escape-view\s*:\s*(.+?)\s*)?;?\s*\}/g, SKIP_START_COMMENT = '@unocss-skip-start', SKIP_END_COMMENT = '@unocss-skip-end', SKIP_COMMENT_RE = RegExp(`(?://\\s*?${SKIP_START_COMMENT}\\s*?|/\\*\\s*?${SKIP_START_COMMENT}\\s*?\\*/|<!--\\s*?${SKIP_START_COMMENT}\\s*?-->)[\\s\\S]*?(?://\\s*?${SKIP_END_COMMENT}\\s*?|/\\*\\s*?${SKIP_END_COMMENT}\\s*?\\*/|<!--\\s*?${SKIP_END_COMMENT}\\s*?-->)`, 'g'), LAYER_IMPORT_RE = /(['"])uno:([^'"]+?)\.css\1/g, getCssEscaperForJsContent = (view)=>{
568
620
  if (!view) return (css)=>css;
569
621
  let prefix = {};
570
622
  return view.trim().replace(/(\\*)\\(["'`\\])/g, (_, bs, char)=>(prefix[char] = bs.replace(/\\\\/g, '\\'), '')), (css)=>css.replace(/["'`\\]/g, (v)=>(prefix[v] || '') + v);
@@ -680,7 +732,7 @@ async function applyCacheConfig({ config, unpackConfig, envFilePaths }) {
680
732
  let cacheConfig = isPlainObject(unpackConfig.performance.cache) ? unpackConfig.performance.cache : {}, buildDependencies = await getBuildDependencies(unpackConfig.root);
681
733
  buildDependencies.userBuildDependencies = cacheConfig.buildDependencies || [], buildDependencies.envFilePaths = envFilePaths;
682
734
  let cacheDirectory = node_path.resolve(unpackConfig.root, cacheConfig.cacheDirectory || `${unpackConfig._context.cachePath}/cache`, utils_isDevServer() ? 'dev' : 'build');
683
- return utils_mergeConfig(config, {
735
+ return mergeConfig(config, {
684
736
  cache: !0,
685
737
  experiments: {
686
738
  cache: {
@@ -781,7 +833,7 @@ let MODULE_PATH_REGEX = /.*[\\/]node_modules[\\/](?!\.pnpm[\\/])(?:(@[^\\/]+)[\\
781
833
  };
782
834
  async function getEntry(root, customEntry) {
783
835
  let entry;
784
- if (entry = customEntry ? node_path.resolve(root, customEntry) : (await external_tinyglobby_glob('(index|Index).{js,ts,jsx,tsx}', {
836
+ if (entry = customEntry ? node_path.resolve(root, customEntry) : (await external_tinyglobby_glob('(index|main).{js,ts,jsx,tsx}', {
785
837
  cwd: node_path.join(root, 'src'),
786
838
  absolute: !0
787
839
  }))[0], !node_fs.existsSync(entry)) throw Error('could not find entry file');
@@ -823,7 +875,7 @@ class JsMinifyPlugin {
823
875
  apply(compiler) {
824
876
  let meta = JSON.stringify({
825
877
  name: jsMinify_PLUGIN_NAME,
826
- version: "4.2.1",
878
+ version: "4.2.2",
827
879
  options: this.minifyOptions
828
880
  });
829
881
  compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
@@ -968,31 +1020,18 @@ let registerHooks_PLUGIN_NAME = 'RegisterHooksPlugin';
968
1020
  class RegisterHooksPlugin {
969
1021
  isFirstCompile = !0;
970
1022
  lastVirtualModules = new Map();
1023
+ isCompiling = !1;
1024
+ idleTimer = void 0;
971
1025
  apply(compiler) {
972
1026
  let virtualModulesPlugin = new rspack.experiments.VirtualModulesPlugin();
973
- virtualModulesPlugin.apply(compiler), compiler.hooks.beforeCompile.tapPromise(registerHooks_PLUGIN_NAME, async ()=>{
974
- await applyPluginsByHook('buildStart', async (impl)=>{
975
- await impl({
1027
+ virtualModulesPlugin.apply(compiler), compiler.hooks.compile.tap(registerHooks_PLUGIN_NAME, ()=>{
1028
+ this.isCompiling = !0, applyPluginsByHookSync('buildStart', (impl)=>{
1029
+ impl({
976
1030
  compiler,
977
1031
  isFirstCompile: this.isFirstCompile,
978
1032
  isWatch: isDev()
979
1033
  });
980
1034
  });
981
- }), compiler.hooks.done.tapPromise(registerHooks_PLUGIN_NAME, async (stats)=>{
982
- stats?.compilation && ((compilation)=>{
983
- let pluginMap = transformTimingMap.get(compilation);
984
- if (pluginMap) {
985
- for (let [pluginName, total] of pluginMap)logger_logger.debug(`${colors.magenta('[plugin]')} ${colors.cyan(pluginName)} ${colors.blue('transform')} ${colors.dim('in')} ${colors.yellow(`${total.toFixed(2)}ms`)}`);
986
- transformTimingMap.delete(compilation);
987
- }
988
- })(stats.compilation), await applyPluginsByHook('buildEnd', async (impl)=>{
989
- await impl({
990
- compiler,
991
- isFirstCompile: this.isFirstCompile,
992
- isWatch: isDev(),
993
- stats
994
- });
995
- }), this.isFirstCompile = !1;
996
1035
  });
997
1036
  let updateVirtualModules = ()=>{
998
1037
  applyPluginsByHookSync('virtualModules', (impl)=>{
@@ -1001,15 +1040,7 @@ class RegisterHooksPlugin {
1001
1040
  });
1002
1041
  });
1003
1042
  };
1004
- compiler.hooks.afterDone.tap(registerHooks_PLUGIN_NAME, ()=>{
1005
- isDev() && setTimeout(()=>{
1006
- updateVirtualModules();
1007
- }, 100);
1008
- }), compiler.hooks.compilation.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
1009
- rspack.HtmlRspackPlugin.getCompilationHooks(compilation).beforeEmit.tapPromise(registerHooks_PLUGIN_NAME, async (data)=>(await applyPluginsByHook('transformHtml', async (impl)=>{
1010
- data.html = await impl(data.html);
1011
- }), data));
1012
- }), compiler.hooks.thisCompilation.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
1043
+ compiler.hooks.thisCompilation.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
1013
1044
  updateVirtualModules(), applyPluginsByHook('processAssets', (impl, plugin)=>{
1014
1045
  let { stage, handler } = impl;
1015
1046
  compilation.hooks.processAssets.tapPromise({
@@ -1030,6 +1061,29 @@ class RegisterHooksPlugin {
1030
1061
  }
1031
1062
  });
1032
1063
  });
1064
+ }), compiler.hooks.compilation.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
1065
+ rspack.HtmlRspackPlugin.getCompilationHooks(compilation).beforeEmit.tapPromise(registerHooks_PLUGIN_NAME, async (data)=>(await applyPluginsByHook('transformHtml', async (impl)=>{
1066
+ data.html = await impl(data.html);
1067
+ }), data));
1068
+ }), compiler.hooks.finishMake.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
1069
+ let pluginMap = transformTimingMap.get(compilation);
1070
+ if (pluginMap) {
1071
+ for (let [pluginName, total] of pluginMap)logger_logger.debug(`${colors.magenta('[plugin]')} ${colors.cyan(pluginName)} ${colors.blue('transform')} ${colors.dim('in')} ${colors.yellow(`${total.toFixed(2)}ms`)}`);
1072
+ transformTimingMap.delete(compilation);
1073
+ }
1074
+ }), compiler.hooks.done.tapPromise(registerHooks_PLUGIN_NAME, async (stats)=>{
1075
+ await applyPluginsByHook('buildEnd', async (impl)=>{
1076
+ await impl({
1077
+ compiler,
1078
+ isFirstCompile: this.isFirstCompile,
1079
+ isWatch: isDev(),
1080
+ stats
1081
+ });
1082
+ }), this.isFirstCompile = !1;
1083
+ }), compiler.hooks.afterDone.tap(registerHooks_PLUGIN_NAME, ()=>{
1084
+ this.isCompiling = !1, isDev() && (clearTimeout(this.idleTimer), this.idleTimer = setTimeout(()=>{
1085
+ this.isCompiling || updateVirtualModules();
1086
+ }, 50));
1033
1087
  });
1034
1088
  }
1035
1089
  }
@@ -1069,7 +1123,7 @@ async function getBundlerConfig(originalUnpackConfig) {
1069
1123
  await applyPluginsByHook('config', async (impl)=>{
1070
1124
  rest = await impl(rest, {
1071
1125
  ...originalUnpackConfig._context,
1072
- mergeConfig: utils_mergeConfig
1126
+ mergeConfig: mergeConfig
1073
1127
  });
1074
1128
  });
1075
1129
  let unpackConfig = {
@@ -1080,7 +1134,7 @@ async function getBundlerConfig(originalUnpackConfig) {
1080
1134
  setCurrentUnpackConfig(unpackConfig), await applyPluginsByHook('configResolved', async (impl)=>{
1081
1135
  await impl(unpackConfig, originalUnpackConfig._context);
1082
1136
  });
1083
- let tsconfigPath = node_path.resolve(unpackConfig.root, 'tsconfig.json'), isTs = node_fs.existsSync(tsconfigPath), minifyOptions = isPlainObject(unpackConfig.build?.minify) ? unpackConfig.build?.minify : {}, { publicVars, filePaths: envFilePaths } = function({ cwd = process.cwd(), mode = getNodeEnv(), prefixes = [
1137
+ let tsconfigPath = node_path.resolve(unpackConfig.root, 'tsconfig.json'), isTS = node_fs.existsSync(tsconfigPath), minifyOptions = isPlainObject(unpackConfig.build?.minify) ? unpackConfig.build?.minify : {}, { publicVars, filePaths: envFilePaths } = function({ cwd = process.cwd(), mode = getNodeEnv(), prefixes = [
1084
1138
  'PUBLIC_'
1085
1139
  ], processEnv = process.env } = {}) {
1086
1140
  if ('local' === mode) throw Error(`${colors.yellow('local')} cannot be used as a value for env mode, because ${colors.yellow('.env.local')} represents a temporary local file. Please use another value.`);
@@ -1197,11 +1251,11 @@ async function getBundlerConfig(originalUnpackConfig) {
1197
1251
  ].filter(Boolean),
1198
1252
  externals: unpackConfig.externals,
1199
1253
  resolve: {
1200
- tsConfig: isTs ? tsconfigPath : void 0,
1201
- alias: {
1202
- '@': node_path.resolve(unpackConfig.root, 'src'),
1203
- ...unpackConfig.resolve?.alias
1204
- },
1254
+ tsConfig: isTS ? {
1255
+ configFile: tsconfigPath,
1256
+ references: 'auto'
1257
+ } : void 0,
1258
+ alias: unpackConfig.resolve?.alias,
1205
1259
  extensionAlias: {
1206
1260
  '.js': [
1207
1261
  '.js',
@@ -1236,12 +1290,12 @@ async function getBundlerConfig(originalUnpackConfig) {
1236
1290
  moduleIds: isDev() ? 'named' : 'deterministic',
1237
1291
  minimize: !!unpackConfig.build?.minify && utils_isProd(),
1238
1292
  minimizer: [
1239
- new JsMinifyPlugin(utils_mergeConfig({
1293
+ new JsMinifyPlugin(mergeConfig({
1240
1294
  compress: {
1241
1295
  target: unpackConfig.build.target
1242
1296
  }
1243
1297
  }, minifyOptions.oxc || {})),
1244
- new rspack.LightningCssMinimizerRspackPlugin(utils_mergeConfig({
1298
+ new rspack.LightningCssMinimizerRspackPlugin(mergeConfig({
1245
1299
  minimizerOptions: {
1246
1300
  targets: esVersionToBrowserslist(unpackConfig.build.target)
1247
1301
  }
@@ -1339,7 +1393,7 @@ async function getBundlerConfig(originalUnpackConfig) {
1339
1393
  type: 'css/module'
1340
1394
  }), getLessLoader = ()=>({
1341
1395
  loader: getCompiledPkgPath('less-loader'),
1342
- options: utils_mergeConfig({
1396
+ options: mergeConfig({
1343
1397
  lessOptions: {
1344
1398
  javascriptEnabled: !0
1345
1399
  },
@@ -1484,7 +1538,7 @@ async function getBundlerConfig(originalUnpackConfig) {
1484
1538
  getCssLoader(),
1485
1539
  {
1486
1540
  loader: getCompiledPkgPath('less-loader'),
1487
- options: utils_mergeConfig({
1541
+ options: mergeConfig({
1488
1542
  lessOptions: {
1489
1543
  javascriptEnabled: !0
1490
1544
  },
@@ -1537,7 +1591,7 @@ async function getBundlerConfig(originalUnpackConfig) {
1537
1591
  })), unpackConfig.performance?.buildAnalyze && utils_isProd() && (config = await applyBuildAnalyzeConfig({
1538
1592
  config,
1539
1593
  unpackConfig
1540
- })), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
1594
+ })), unpackConfig.typeCheck && isDev() && isTS && (config = await applyTypeCheckConfig({
1541
1595
  config,
1542
1596
  unpackConfig
1543
1597
  })), unpackConfig.detectCircular && (config = function({ config, unpackConfig }) {
@@ -1577,11 +1631,11 @@ async function getBundlerConfig(originalUnpackConfig) {
1577
1631
  config = await impl(config, {
1578
1632
  ...originalUnpackConfig._context,
1579
1633
  unpackConfig,
1580
- mergeConfig: utils_mergeConfig
1634
+ mergeConfig: mergeConfig
1581
1635
  });
1582
1636
  }), unpackConfig.bundlerConfig && (config = isFunction(unpackConfig.bundlerConfig) ? await unpackConfig.bundlerConfig(config, {
1583
- mergeConfig: utils_mergeConfig
1584
- }) : utils_mergeConfig(config, unpackConfig.bundlerConfig)), config;
1637
+ mergeConfig: mergeConfig
1638
+ }) : mergeConfig(config, unpackConfig.bundlerConfig)), config;
1585
1639
  }
1586
1640
  async function unpackBuild(unpackConfig) {
1587
1641
  let compiler = rspack(await getBundlerConfig(unpackConfig)), handler = (err, stats)=>{
@@ -1702,7 +1756,7 @@ async function unpackDev(unpackConfig) {
1702
1756
  ...middlewares
1703
1757
  ]);
1704
1758
  let server = new RspackDevServer(devServerOptions, compiler);
1705
- await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v4.2.1`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - getUnpackStartTime()))} ${colors.dim('ms')}\n`), printServerUrls({
1759
+ await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v4.2.2`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - getUnpackStartTime()))} ${colors.dim('ms')}\n`), printServerUrls({
1706
1760
  port,
1707
1761
  host: unpackConfig.server.host,
1708
1762
  base: unpackConfig.base
@@ -1716,10 +1770,10 @@ async function unpackDev(unpackConfig) {
1716
1770
  function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'unpack' }) {
1717
1771
  let _context = {
1718
1772
  callerName,
1719
- version: "4.2.1",
1773
+ version: "4.2.2",
1720
1774
  cachePath: 'node_modules/.unpack'
1721
1775
  }, resolveConfig = (mode)=>{
1722
- let rootPath, outputPath, basePath, cachedTraceMap, fs, isValidMethodName, parseFrame, formatOriginalLocation, formatFullStack, resolveErrorLocationAndStack, shouldTransformDeepImport, preJsAssets, jsAssets, cssAssets, bundledDepsCachePath, deepImportPkgPattern, deepImportRegex, plugin, root, uno, configFilePath, configOrPathFromUnpackConfig, defaultsFromUnpackConfig, compilerRef, rootDir, unoConfig, tokens, unocssCacheDir, tokensCachePath, timeCachePath, layersCachePath, bundlerCacheDir, cachedTokensLength, cachedLayersLength, tasks, requestedLayers, layerImportRE, ensureReady, invalidate, flushTasks, getVirtualModuleContent, hash, restoreSkipCode, applyUnoTransformers, getResolvedLayers, optionsFromUnpackConfig, rootPath1, registerCode, namesCode, defaultConfig = {
1776
+ let rootPath, outputPath, basePath, cachedTraceMap, fs, isValidMethodName, parseFrame, formatOriginalLocation, formatFullStack, resolveErrorLocationAndStack, root, alias, shouldTransformDeepImport, preJsAssets, jsAssets, cssAssets, bundledDepsCachePath, deepImportPkgPattern, deepImportRegex, plugin, root1, uno, generated, configOrPathFromUnpackConfig, defaultsFromUnpackConfig, VIRTUAL_UNO_CSS_ID, rootDir, isMpa, unoConfig, configFilePath, unpackConfigPath, tokens, requestedLayers, tasks, unocssCacheDir, tokensCachePath, layersCachePath, timeCachePath, configHashCachePath, generatedCachePath, bundlerCacheDir, cachedTokensLength, cachedLayersLength, isCompiling, resolveUnocssConfig, flushTasks, getLayersKey, getVirtualModuleContent, hash, restoreSkipCode, applyUnoTransformers, getCustomLayers, optionsFromUnpackConfig, rootPath1, registerCode, namesCode, defaultConfig = {
1723
1777
  root: cwd,
1724
1778
  base: '/',
1725
1779
  sourceMap: 'production' !== mode && 'cheap-module-source-map',
@@ -1863,7 +1917,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
1863
1917
  }, {
1864
1918
  name: 'unpack:browser-logs',
1865
1919
  apply: (config, { command })=>'dev' === command && config.dev?.browserLogs,
1866
- buildStart: async ({ isFirstCompile, compiler })=>{
1920
+ buildStart: ({ isFirstCompile, compiler })=>{
1867
1921
  isFirstCompile && (fs = compiler.outputFileSystem);
1868
1922
  },
1869
1923
  configResolved: (config)=>{
@@ -2022,8 +2076,11 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2022
2076
  ...middlewares
2023
2077
  ]
2024
2078
  }),
2025
- {
2079
+ (root = '', alias = {}, {
2026
2080
  name: 'unpack:glob',
2081
+ configResolved: (config)=>{
2082
+ root = config.root, alias = config.resolve?.alias || {};
2083
+ },
2027
2084
  transform: {
2028
2085
  filter: {
2029
2086
  test: JS_REGEX
@@ -2042,10 +2099,10 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2042
2099
  excludes
2043
2100
  });
2044
2101
  return includes1.length ? (({ includes, excludes, eager })=>{
2045
- let excludeMatchers = excludes.map((item)=>toRegexLiteral(item.regExpSource)).join(', '), includeItems = includes.map((item)=>{
2102
+ let excludeMatchers = excludes.map((item)=>toRegexLiteral(item.regExpSource)).join(', '), modeExpr = eager ? 'sync' : 'lazy', includeItems = includes.map((item)=>{
2046
2103
  let prefix = './' === item.publicPrefix ? '' : `${item.publicPrefix}/`, mapKeyExpr = './' === item.publicPrefix ? "key.startsWith('./') ? key : './' + key" : `${JSON.stringify(prefix)} + (key.startsWith('./') ? key.slice(2) : key)`;
2047
2104
  return `{
2048
- context: import.meta.webpackContext(${JSON.stringify(item.baseDir)}, { recursive: ${item.recursive}, regExp: ${toRegexLiteral(item.regExpSource)} }),
2105
+ context: import.meta.webpackContext(${JSON.stringify(item.baseDir)}, { recursive: ${item.recursive}, regExp: ${toRegexLiteral(item.regExpSource)}, mode: ${JSON.stringify(modeExpr)} }),
2049
2106
  mapKey: (key) => ${mapKeyExpr}
2050
2107
  }`;
2051
2108
  }).join(', '), excludeList = excludeMatchers ? `[${excludeMatchers}]` : '[]';
@@ -2059,27 +2116,36 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2059
2116
  const path = mapKey(key)
2060
2117
  if (isExcluded(path)) continue
2061
2118
  if (!modules[path]) {
2062
- modules[path] = ${eager ? 'context(key)' : '() => Promise.resolve(context(key))'}
2119
+ modules[path] = ${eager ? 'context(key)' : '() => context(key)'}
2063
2120
  }
2064
2121
  }
2065
2122
  }
2066
2123
  return modules
2067
2124
  })()`;
2068
2125
  })({
2069
- includes: includes1.map(parseGlob),
2070
- excludes: excludes1.map(parseGlob),
2126
+ includes: includes1.map((p)=>normalizeGlobByAliases(p, {
2127
+ root,
2128
+ alias
2129
+ })).map(parseGlob),
2130
+ excludes: excludes1.map((p)=>normalizeGlobByAliases(p, {
2131
+ root,
2132
+ alias
2133
+ })).map(parseGlob),
2071
2134
  eager: hasEager(rawOptions)
2072
2135
  }) : '({})';
2073
2136
  }
2074
- let { baseDir, regExpSource, recursive, publicPrefix } = parseGlob(pattern);
2137
+ let { baseDir, regExpSource, recursive, publicPrefix } = parseGlob(normalizeGlobByAliases(pattern, {
2138
+ root,
2139
+ alias
2140
+ }));
2075
2141
  return (({ baseDir, regExpSource, recursive, eager, publicPrefix })=>{
2076
2142
  let prefix = './' === publicPrefix ? '' : `${publicPrefix}/`, mapKeyExpr = './' === publicPrefix ? "key.startsWith('./') ? key : './' + key" : `${JSON.stringify(prefix)} + (key.startsWith('./') ? key.slice(2) : key)`;
2077
2143
  return `(() => {
2078
- const context = import.meta.webpackContext(${JSON.stringify(baseDir)}, { recursive: ${recursive}, regExp: ${toRegexLiteral(regExpSource)} })
2144
+ const context = import.meta.webpackContext(${JSON.stringify(baseDir)}, { recursive: ${recursive}, regExp: ${toRegexLiteral(regExpSource)}, mode: ${JSON.stringify(eager ? 'sync' : 'lazy')} })
2079
2145
  const modules = {}
2080
2146
  for (const key of context.keys()) {
2081
2147
  const path = ${mapKeyExpr}
2082
- modules[path] = ${eager ? 'context(key)' : '() => Promise.resolve(context(key))'}
2148
+ modules[path] = ${eager ? 'context(key)' : '() => context(key)'}
2083
2149
  }
2084
2150
  return modules
2085
2151
  })()`;
@@ -2092,7 +2158,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2092
2158
  });
2093
2159
  }) : null
2094
2160
  }
2095
- },
2161
+ }),
2096
2162
  (shouldTransformDeepImport = !1, preJsAssets = [], jsAssets = [], cssAssets = [], bundledDepsCachePath = '', deepImportPkgPattern = [
2097
2163
  ...SPECIAL_NO_ENTRY_DEPS
2098
2164
  ].sort((a, b)=>b.length - a.length).map((name)=>name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|'), deepImportRegex = RegExp(`import\\s+([a-zA-Z0-9_$]+)\\s+from\\s+['"]((${deepImportPkgPattern})/[^'"]+)['"]`, 'g'), plugin = {
@@ -2370,11 +2436,11 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2370
2436
  }), config;
2371
2437
  }
2372
2438
  }),
2373
- (root = '', {
2439
+ (root1 = '', {
2374
2440
  name: 'unpack:file-size',
2375
2441
  apply: (config, { mode })=>'production' === mode && config.performance?.printFileSize,
2376
2442
  configResolved (config) {
2377
- root = config.root;
2443
+ root1 = config.root;
2378
2444
  },
2379
2445
  buildEnd: async (options)=>{
2380
2446
  let { stats } = options;
@@ -2400,7 +2466,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2400
2466
  color: 'cyan',
2401
2467
  chunks: []
2402
2468
  }
2403
- ], chunkGroupMap = chunkGroups.reduce((acc, cur)=>(acc[cur.type] = cur, acc), {}), distPath = stats.compilation.outputOptions.path, distFolder = node_path.relative(root, distPath), assets = Object.entries(stats.compilation.assets), longest = 0, totalSize = 0, totalCompressedSize = 0;
2469
+ ], chunkGroupMap = chunkGroups.reduce((acc, cur)=>(acc[cur.type] = cur, acc), {}), distPath = stats.compilation.outputOptions.path, distFolder = node_path.relative(root1, distPath), assets = Object.entries(stats.compilation.assets), longest = 0, totalSize = 0, totalCompressedSize = 0;
2404
2470
  logUpdate('computing gzip size...'), await Promise.all(assets.map(async ([assetName, value])=>{
2405
2471
  let content, compressedSize, filePath = assetName.split('?')[0];
2406
2472
  try {
@@ -2442,34 +2508,26 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2442
2508
  log += colors.blue(displaySize(totalSize)), console.log(log += colors.dim(` │ gzip: ${displaySize(totalCompressedSize)}`));
2443
2509
  }
2444
2510
  }),
2445
- (rootDir = process.cwd(), unoConfig = {}, tokens = new Set(), unocssCacheDir = '', tokensCachePath = '', timeCachePath = '', layersCachePath = '', bundlerCacheDir = '', cachedTokensLength = 0, cachedLayersLength = 0, tasks = [], requestedLayers = new Set([
2511
+ (VIRTUAL_UNO_CSS_ID = 'uno.css', rootDir = process.cwd(), isMpa = !1, unoConfig = {}, configFilePath = '', unpackConfigPath = '', tokens = new Set(), requestedLayers = new Set([
2446
2512
  LAYER_MARK_ALL
2447
- ]), layerImportRE = /(['"])uno:([^'"]+?)\.css\1/g, ensureReady = async ()=>{
2448
- var root, configOrPath;
2449
- let core = await import("@unocss/core"), resolvedConfigOrPath = (root = rootDir, 'string' != typeof (configOrPath = (void 0) ?? configOrPathFromUnpackConfig) || node_path.isAbsolute(configOrPath) ? configOrPath : node_path.resolve(root, configOrPath)), resolvedDefaults = (void 0) ?? defaultsFromUnpackConfig, configFromOption = {};
2450
- if (isPlainObject(resolvedConfigOrPath) ? configFromOption = resolvedConfigOrPath : isString(resolvedConfigOrPath) && (configFilePath = resolvedConfigOrPath), configFilePath || (configFilePath = ((root, customConfig)=>{
2513
+ ]), tasks = [], unocssCacheDir = '', tokensCachePath = '', layersCachePath = '', timeCachePath = '', configHashCachePath = '', generatedCachePath = '', bundlerCacheDir = '', cachedTokensLength = 0, cachedLayersLength = 0, isCompiling = !0, resolveUnocssConfig = async ()=>{
2514
+ let resolvedConfigOrPath = (void 0) ?? configOrPathFromUnpackConfig, resolvedDefaults = (void 0) ?? defaultsFromUnpackConfig, configFromOption = {};
2515
+ return isPlainObject(resolvedConfigOrPath) ? configFromOption = resolvedConfigOrPath : isString(resolvedConfigOrPath) && (configFilePath = node_path.isAbsolute(resolvedConfigOrPath) ? resolvedConfigOrPath : node_path.resolve(rootDir, resolvedConfigOrPath)), configFilePath = ((root, customConfig)=>{
2516
+ if (customConfig) {
2517
+ let absPath = node_path.isAbsolute(customConfig) ? customConfig : node_path.resolve(root, customConfig);
2518
+ if (node_fs.existsSync(absPath)) return absPath;
2519
+ }
2451
2520
  for (let file of UNOCSS_CONFIG_FILES){
2452
2521
  let configFile = node_path.join(root, file);
2453
2522
  if (node_fs.existsSync(configFile)) return configFile;
2454
2523
  }
2455
- })(rootDir)), configFilePath && node_fs.existsSync(configFilePath) && (configFromOption = utils_mergeConfig(configFromOption, await loadConfigFile(configFilePath))), resolvedDefaults && (configFromOption = utils_mergeConfig(resolvedDefaults, configFromOption)), unoConfig = configFromOption, uno = await core.createGenerator(unoConfig), tokens = new Set(), node_fs.existsSync(tokensCachePath)) {
2456
- let cached = JSON.parse(node_fs.readFileSync(tokensCachePath, 'utf-8'));
2457
- Array.isArray(cached) && (cachedTokensLength = (tokens = new Set(cached)).size, logger_logger.debug(colors.yellow(`[unocss] Load ${tokens.size} token from cache.`)));
2458
- }
2459
- if (node_fs.existsSync(layersCachePath)) {
2460
- let cached = JSON.parse(node_fs.readFileSync(layersCachePath, 'utf-8'));
2461
- Array.isArray(cached) && (cachedLayersLength = (requestedLayers = new Set(cached)).size, logger_logger.debug(colors.yellow(`[unocss] Load ${requestedLayers.size} layer from cache.`)));
2462
- }
2463
- }, invalidate = ()=>{
2464
- setTimeout(()=>{
2465
- compilerRef.watching.invalidate(), logger_logger.debug(colors.yellow('[unocss] Invalidation triggered.'));
2466
- }, 0);
2524
+ })(rootDir, configFilePath), configFromOption = mergeConfig(configFromOption, await loadConfigFile(configFilePath)), resolvedDefaults && (configFromOption = mergeConfig(resolvedDefaults, configFromOption)), configFromOption;
2467
2525
  }, flushTasks = async ()=>{
2468
2526
  if (!tasks.length) return;
2469
2527
  let pending = tasks.map((t)=>t());
2470
2528
  tasks = [], await Promise.all(pending);
2471
- }, getVirtualModuleContent = (layer)=>{
2472
- let code, layersKey = Array.from(requestedLayers).sort().join(','), hash = (code = `${tokens.size}|${layer}|${layersKey}`, createHash('sha256').update(code).digest('hex').slice(0, 8));
2529
+ }, getLayersKey = ()=>Array.from(requestedLayers).sort().join(','), getVirtualModuleContent = (layer)=>{
2530
+ let code, hash = (code = `${tokens.size}|${layer}|${getLayersKey()}`, createHash('sha256').update(code).digest('hex').slice(0, 8));
2473
2531
  return `#--unocss-hash--{content:"${hash}"}#--unocss--{layer:${layer};escape-view:\\"\\'\\\`\\\\}`;
2474
2532
  }, hash = (str)=>{
2475
2533
  let i, l, hVal = 0x811c9dc5;
@@ -2494,50 +2552,74 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2494
2552
  for (let t of transformers)(!t.idFilter || t.idFilter(id)) && (await t.transform(s, id, {
2495
2553
  uno,
2496
2554
  tokens,
2497
- invalidate
2555
+ invalidate: ()=>{}
2498
2556
  }), s.hasChanged() && (s = new magic_string(code = restoreSkipCode(s.toString(), skipMap))));
2499
2557
  return code !== original ? code : null;
2500
- }, getResolvedLayers = ()=>Array.from(requestedLayers).filter((layer)=>layer !== LAYER_MARK_ALL), {
2558
+ }, getCustomLayers = ()=>Array.from(requestedLayers).filter((layer)=>layer !== LAYER_MARK_ALL), {
2501
2559
  name: 'unpack:unocss',
2502
- apply: (config)=>!!config.unocss,
2560
+ apply: (config)=>!!config.css?.unocss,
2503
2561
  configResolved: async (config, { cachePath })=>{
2504
- if (rootDir = config.root, unocssCacheDir = node_path.resolve(rootDir, cachePath, 'unocss'), tokensCachePath = node_path.resolve(unocssCacheDir, 'tokens'), timeCachePath = node_path.resolve(unocssCacheDir, 'created_at'), layersCachePath = node_path.resolve(unocssCacheDir, 'layers'), bundlerCacheDir = node_path.resolve(rootDir, cachePath, 'cache'), ensureDir(unocssCacheDir), (()=>{
2505
- let now = Date.now(), last = 0;
2506
- if (!node_fs.existsSync(timeCachePath)) {
2507
- node_fs.writeFileSync(timeCachePath, String(now), 'utf-8'), emptyDir(bundlerCacheDir);
2508
- return;
2509
- }
2510
- let parsed = Number(node_fs.readFileSync(timeCachePath, 'utf-8').trim());
2511
- Number.isNaN(parsed) || (last = parsed), now - last < 604800000 || (emptyDir(unocssCacheDir), emptyDir(bundlerCacheDir), node_fs.writeFileSync(timeCachePath, String(now), 'utf-8'));
2512
- })(), Array.isArray(config.unocss)) {
2513
- let [configOrPathValue, defaultsValue] = config.unocss;
2562
+ if (rootDir = config.root, isMpa = !!config.mpa, unpackConfigPath = resolveConfigPath(rootDir), bundlerCacheDir = node_path.resolve(rootDir, cachePath, 'cache'), unocssCacheDir = node_path.resolve(rootDir, cachePath, 'unocss'), tokensCachePath = node_path.resolve(unocssCacheDir, 'tokens'), layersCachePath = node_path.resolve(unocssCacheDir, 'layers'), timeCachePath = node_path.resolve(unocssCacheDir, 'created_at'), configHashCachePath = node_path.resolve(unocssCacheDir, 'config_hash'), generatedCachePath = node_path.resolve(unocssCacheDir, 'generated'), Array.isArray(config.css?.unocss)) {
2563
+ let [configOrPathValue, defaultsValue] = config.css.unocss;
2514
2564
  configOrPathFromUnpackConfig = configOrPathValue, defaultsFromUnpackConfig = defaultsValue;
2515
2565
  }
2516
- await ensureReady();
2517
- },
2518
- bundlerConfig: (config, { mergeConfig, unpackConfig })=>mergeConfig(config, {
2519
- experiments: {
2520
- cache: {
2521
- type: unpackConfig.performance?.cache ? 'persistent' : 'memory',
2522
- buildDependencies: configFilePath ? [
2523
- configFilePath
2524
- ] : void 0
2566
+ unoConfig = await resolveUnocssConfig();
2567
+ let core = await import("@unocss/core");
2568
+ uno = await core.createGenerator(unoConfig), (()=>{
2569
+ let now = Date.now(), nextHash = getFilesContentHash([
2570
+ configFilePath,
2571
+ unpackConfigPath
2572
+ ]);
2573
+ if (!node_fs.existsSync(unocssCacheDir)) {
2574
+ ensureDir(unocssCacheDir), node_fs.writeFileSync(timeCachePath, String(now), 'utf-8'), node_fs.writeFileSync(configHashCachePath, nextHash, 'utf-8'), removeDir(bundlerCacheDir);
2575
+ return;
2576
+ }
2577
+ let cachedTime = Number(node_fs.readFileSync(timeCachePath, 'utf-8').trim()), cachedHash = node_fs.readFileSync(configHashCachePath, 'utf-8').trim(), isExpired = now - cachedTime >= 604800000, isHashChanged = cachedHash !== nextHash;
2578
+ (isExpired || isHashChanged) && (isExpired && logger_logger.debug(colors.yellow('[unocss] Cache expired, clear cache.')), isHashChanged && logger_logger.debug(colors.yellow('[unocss] Config hash changed, clear cache.')), removeDir(unocssCacheDir), removeDir(bundlerCacheDir), ensureDir(unocssCacheDir), node_fs.writeFileSync(timeCachePath, String(now), 'utf-8'), node_fs.writeFileSync(configHashCachePath, nextHash, 'utf-8'));
2579
+ })(), (()=>{
2580
+ if (node_fs.existsSync(tokensCachePath)) {
2581
+ let cached = JSON.parse(node_fs.readFileSync(tokensCachePath, 'utf-8'));
2582
+ Array.isArray(cached) && (cachedTokensLength = (tokens = new Set(cached)).size, logger_logger.debug(colors.yellow(`[unocss] Load ${tokens.size} token from cache.`)));
2583
+ }
2584
+ if (node_fs.existsSync(layersCachePath)) {
2585
+ let cached = JSON.parse(node_fs.readFileSync(layersCachePath, 'utf-8'));
2586
+ Array.isArray(cached) && (cachedLayersLength = (requestedLayers = new Set(cached)).size, logger_logger.debug(colors.yellow(`[unocss] Load ${requestedLayers.size} layer from cache.`)));
2587
+ }
2588
+ if (node_fs.existsSync(generatedCachePath)) {
2589
+ let cached = JSON.parse(node_fs.readFileSync(generatedCachePath, 'utf-8'));
2590
+ if (cached && cached.meta?.tokensLength === tokens.size && cached.meta?.layersKey === getLayersKey()) {
2591
+ let list, index, runChunk, timer;
2592
+ generated = cached, isDev() && (list = Array.from(tokens), index = 0, timer = setTimeout(runChunk = ()=>{
2593
+ if (isCompiling) {
2594
+ let timer = setTimeout(runChunk, 100);
2595
+ timer.unref?.();
2596
+ return;
2597
+ }
2598
+ let end = Math.min(index + 200, list.length);
2599
+ for(; index < end; index++)uno.parseToken(list[index]);
2600
+ if (logger_logger.debug(colors.yellow(`[unocss] Warmup tokens ${index}/${list.length}.`)), index < list.length) {
2601
+ let timer = setTimeout(runChunk, 0);
2602
+ timer.unref?.();
2603
+ }
2604
+ }, 0), timer.unref?.()), logger_logger.debug(colors.yellow('[unocss] Load generated css from cache.'));
2525
2605
  }
2526
2606
  }
2527
- }),
2528
- buildStart ({ compiler }) {
2529
- compilerRef = compiler;
2607
+ })();
2608
+ },
2609
+ buildStart () {
2610
+ isCompiling = !0;
2530
2611
  },
2531
2612
  buildEnd () {
2532
- tokens.size !== cachedTokensLength && (node_fs.writeFileSync(tokensCachePath, JSON.stringify(Array.from(tokens)), 'utf-8'), logger_logger.debug(colors.yellow(`[unocss] Add ${tokens.size - cachedTokensLength} token to cache.`)), cachedTokensLength = tokens.size), requestedLayers.size !== cachedLayersLength && (node_fs.writeFileSync(layersCachePath, JSON.stringify(Array.from(requestedLayers)), 'utf-8'), logger_logger.debug(colors.yellow(`[unocss] Add ${requestedLayers.size - cachedLayersLength} layer to cache.`)), cachedLayersLength = requestedLayers.size);
2613
+ isCompiling = !1, tokens.size !== cachedTokensLength && (node_fs.writeFileSync(tokensCachePath, JSON.stringify(Array.from(tokens)), 'utf-8'), logger_logger.debug(colors.yellow(`[unocss] Add ${tokens.size - cachedTokensLength} token to cache.`)), cachedTokensLength = tokens.size), requestedLayers.size !== cachedLayersLength && (node_fs.writeFileSync(layersCachePath, JSON.stringify(Array.from(requestedLayers)), 'utf-8'), logger_logger.debug(colors.yellow(`[unocss] Add ${requestedLayers.size - cachedLayersLength} layer to cache.`)), cachedLayersLength = requestedLayers.size);
2533
2614
  },
2534
2615
  transform: {
2535
2616
  filter: {
2536
- test: /\.(vue|svelte|[jt]sx?|vine\.ts|mdx?|astro|elm|php|phtml|marko)($|\?)/
2617
+ test: /\.(vue|svelte|[jt]sx?|vine\.ts|mdx?|astro|elm|php|phtml|marko|css|scss|sass|less)($|\?)/
2537
2618
  },
2538
2619
  handler: async (code, id)=>{
2539
2620
  var task;
2540
- if (code.includes('uno:')) for (let match of code.matchAll(layerImportRE)){
2621
+ if (id.endsWith(VIRTUAL_UNO_CSS_ID) || /uno:[^?]+\.css(?:\?|$)/.test(id)) return null;
2622
+ if (code.includes('uno:')) for (let match of code.matchAll(LAYER_IMPORT_RE)){
2541
2623
  let layer = match[2];
2542
2624
  layer && requestedLayers.add(layer);
2543
2625
  }
@@ -2556,25 +2638,36 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2556
2638
  stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,
2557
2639
  handler: async ({ compilation, sources })=>{
2558
2640
  await flushTasks();
2559
- let resolvedLayers = getResolvedLayers(), result = await uno.generate(tokens, {
2560
- minify: !0
2561
- });
2641
+ let layersKey = getLayersKey();
2642
+ if (!generated || generated.meta.tokensLength !== tokens.size || generated.meta.layersKey !== layersKey) {
2643
+ let result = await uno.generate(tokens, {
2644
+ minify: !0
2645
+ }), customLayers = getCustomLayers();
2646
+ generated = {
2647
+ meta: {
2648
+ tokensLength: tokens.size,
2649
+ layersKey
2650
+ },
2651
+ allCSS: result.getLayers(void 0, customLayers),
2652
+ layerCSS: customLayers.reduce((acc, layer)=>(acc[layer] = result.getLayer(layer) || '', acc), {})
2653
+ }, node_fs.writeFileSync(generatedCachePath, JSON.stringify(generated), 'utf-8');
2654
+ }
2562
2655
  for (let file of Object.keys(compilation.assets)){
2563
- if ('*' === file || file.includes('vendor')) continue;
2656
+ if (!isMpa && !file.includes('main')) continue;
2564
2657
  let code = compilation.assets[file].source().toString();
2565
2658
  if (!code.includes('#--unocss')) continue;
2566
2659
  let isJsAsset = /\.(?:[cm]?js|[cm]?jsx)$/.test(file), replaced = !1;
2567
2660
  code = (code = code.replace(HASH_PLACEHOLDER_RE, '')).replace(LAYER_PLACEHOLDER_RE, (_, layer, escapeView)=>{
2568
2661
  replaced = !0;
2569
- let css = layer.trim() === LAYER_MARK_ALL ? result.getLayers(void 0, resolvedLayers) : result.getLayer(layer) || '';
2662
+ let css = layer.trim() === LAYER_MARK_ALL ? generated.allCSS : generated.layerCSS[layer] || '';
2570
2663
  return isJsAsset ? getCssEscaperForJsContent(escapeView)(css) : css;
2571
2664
  }), replaced && compilation.updateAsset(file, new sources.RawSource(code));
2572
2665
  }
2573
2666
  }
2574
2667
  },
2575
2668
  virtualModules: ()=>({
2576
- 'uno.css': getVirtualModuleContent(LAYER_MARK_ALL),
2577
- ...getResolvedLayers().reduce((acc, layer)=>(acc[`uno:${layer}.css`] = getVirtualModuleContent(layer), acc), {})
2669
+ [VIRTUAL_UNO_CSS_ID]: getVirtualModuleContent(LAYER_MARK_ALL),
2670
+ ...getCustomLayers().reduce((acc, layer)=>(acc[`uno:${layer}.css`] = getVirtualModuleContent(layer), acc), {})
2578
2671
  })
2579
2672
  }),
2580
2673
  (rootPath1 = '', registerCode = '', namesCode = '', {
@@ -2610,7 +2703,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2610
2703
  ]
2611
2704
  };
2612
2705
  return {
2613
- ...utils_mergeConfig(defaultConfig, userConfig),
2706
+ ...mergeConfig(defaultConfig, userConfig),
2614
2707
  _context
2615
2708
  };
2616
2709
  };
@@ -2619,7 +2712,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2619
2712
  let mode = watch ? 'development' : 'production';
2620
2713
  setNodeEnv(mode);
2621
2714
  let config = resolveConfig(mode);
2622
- console.log(colors.brand(`${callerName} v4.2.1`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
2715
+ console.log(colors.brand(`${callerName} v4.2.2`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
2623
2716
  },
2624
2717
  dev: async ()=>{
2625
2718
  setUnpackStartTime(performance.now());
@@ -2768,7 +2861,7 @@ function runCLI() {
2768
2861
  logger_logger.clear(), logger_logger.info(`${node_path.basename(file)} changed, restarting server...`), await watcher.close(), await cleanUpBeforeRestart(), startServer(options);
2769
2862
  });
2770
2863
  });
2771
- devCommand.option('-o, --open [url]', 'Open browser on startup').option('--port <port>', 'Specify port').option('--host', 'Expose hostname').action(startServer), cli.help(), cli.version("4.2.1"), cli.parse();
2864
+ devCommand.option('-o, --open [url]', 'Open browser on startup').option('--port <port>', 'Specify port').option('--host', 'Expose hostname').action(startServer), cli.help(), cli.version("4.2.2"), cli.parse();
2772
2865
  }
2773
2866
  var src_CSS_MODULES_NAMED_EXPORT = !1;
2774
- export { ALL_INTERFACES_IPV4, CSS_MODULES_EXPORTS_CONVENTION, CSS_MODULES_LOCAL_IDENT_NAME, DEV_DEFAULT_FILENAME, JSX_REGEX, JS_REGEX, LOCALHOST, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, SCRIPT_REGEX, TEMPLATE_CONTENT, addRestartCleaner, cleanUpBeforeRestart, clearLine, colors, convertBasicAnsiColors, createChokidar, createUnpack, debounce, defineConfig, emptyDir, ensureDir, esVersionToBrowserslist, external_tinyglobby_glob as glob, findExists, getAddressUrls, getCompiledPkgPath, getCurrentUnpackConfig, getHtmlTemplateOrContent, getIpv4Interfaces, getNodeEnv, getOrSetDefault, getPathInJs, getPort, getTime, getUnpackStartTime, getUserDepPath, getUserDepVersion, globSync, injectToHead, isBoolean, isDebug, isDev, isEmptyDir, isFileExists, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isRegExp, isString, isUndefined, isWin, launchEditor, loadConfig, loadConfigFile, logUpdate, logger_LogColor as LogColor, logger_logger as logger, normalizePublicPath, openBrowser, pLimit, pathExists, pathToExportIdentifier, prettyTime, printServerUrls, removeDir, resolveConfigPath, rspack, runCLI, set, setCurrentUnpackConfig, setDevServer, setNodeEnv, setUnpackStartTime, src_CSS_MODULES_NAMED_EXPORT as CSS_MODULES_NAMED_EXPORT, trackPerformance, utils_isDevServer as isDevServer, utils_isProd as isProd, utils_mergeConfig as mergeConfig };
2867
+ export { ALL_INTERFACES_IPV4, CSS_MODULES_EXPORTS_CONVENTION, CSS_MODULES_LOCAL_IDENT_NAME, DEV_DEFAULT_FILENAME, JSX_REGEX, JS_REGEX, LOCALHOST, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, SCRIPT_REGEX, TEMPLATE_CONTENT, addRestartCleaner, cleanUpBeforeRestart, clearLine, colors, convertBasicAnsiColors, createChokidar, createUnpack, debounce, defineConfig, emptyDir, ensureDir, esVersionToBrowserslist, external_tinyglobby_glob as glob, findExists, getAddressUrls, getCompiledPkgPath, getCurrentUnpackConfig, getFilesContentHash, getHtmlTemplateOrContent, getIpv4Interfaces, getNodeEnv, getOrSetDefault, getPathInJs, getPort, getTime, getUnpackStartTime, getUserDepPath, getUserDepVersion, globSync, injectToHead, isBoolean, isDebug, isDev, isEmptyDir, isFileExists, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isRegExp, isString, isUndefined, isWin, launchEditor, loadConfig, loadConfigFile, logUpdate, logger_LogColor as LogColor, logger_logger as logger, mergeConfig, normalizePublicPath, openBrowser, pLimit, pathExists, pathToExportIdentifier, prettyTime, printServerUrls, removeDir, resolveConfigPath, rspack, runCLI, set, setCurrentUnpackConfig, setDevServer, setNodeEnv, setUnpackStartTime, src_CSS_MODULES_NAMED_EXPORT as CSS_MODULES_NAMED_EXPORT, trackPerformance, utils_isDevServer as isDevServer, utils_isProd as isProd };
@@ -1,5 +1,4 @@
1
1
  import "node:module";
2
- import.meta.url;
3
2
  var __webpack_modules__ = {}, __webpack_module_cache__ = {};
4
3
  function __webpack_require__(moduleId) {
5
4
  var cachedModule = __webpack_module_cache__[moduleId];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAwBnE,wBAAsB,gBAAgB,CACpC,oBAAoB,EAAE,YAAY,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAmN/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAwBnE,wBAAsB,gBAAgB,CACpC,oBAAoB,EAAE,YAAY,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAqN/B"}
@@ -1,7 +1,9 @@
1
1
  import type { Rspack } from '../../types';
2
2
  export declare class RegisterHooksPlugin {
3
- isFirstCompile: boolean;
3
+ private isFirstCompile;
4
4
  private lastVirtualModules;
5
+ private isCompiling;
6
+ private idleTimer;
5
7
  apply(compiler: Rspack.Compiler): void;
6
8
  }
7
9
  //# sourceMappingURL=registerHooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registerHooks.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/plugins/registerHooks.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC,qBAAa,mBAAmB;IAC9B,cAAc,UAAO;IACrB,OAAO,CAAC,kBAAkB,CAA4B;IACtD,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAwEvC"}
1
+ {"version":3,"file":"registerHooks.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/plugins/registerHooks.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,cAAc,CAAO;IAC7B,OAAO,CAAC,kBAAkB,CAA4B;IACtD,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,SAAS,CAAwC;IACzD,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CA8EvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/plugins/glob.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAyK7C,eAAO,MAAM,UAAU,QAAO,YAkC7B,CAAA"}
1
+ {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/plugins/glob.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AA8P7C,eAAO,MAAM,UAAU,QAAO,YA+C7B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"unocss.d.ts","sourceRoot":"","sources":["../../src/plugins/unocss.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAIV,UAAU,EACV,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAMrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;AAClF,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAA;AAwE3F,eAAO,MAAM,YAAY,GAAI,KAAK,SAAS,MAAM,EAC/C,eAAe,mBAAmB,CAAC,KAAK,CAAC,GAAG,MAAM,EAClD,WAAW,oBAAoB,CAAC,KAAK,CAAC,KACrC,YAqTF,CAAA"}
1
+ {"version":3,"file":"unocss.d.ts","sourceRoot":"","sources":["../../src/plugins/unocss.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAIV,UAAU,EACV,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAOrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAU7C,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;AAClF,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAA;AAoE3F,eAAO,MAAM,YAAY,GAAI,KAAK,SAAS,MAAM,EAC/C,eAAe,mBAAmB,CAAC,KAAK,CAAC,GAAG,MAAM,EAClD,WAAW,oBAAoB,CAAC,KAAK,CAAC,KACrC,YAwWF,CAAA"}
@@ -96,6 +96,10 @@ export type UnpackConfig = {
96
96
  warnRuleAsWarning?: boolean;
97
97
  api?: 'legacy' | 'modern' | 'modern-compiler';
98
98
  };
99
+ /**
100
+ * Unocss plugin options.
101
+ */
102
+ unocss?: boolean | [configOrPath?: PluginUnocssOptions | string, defaults?: PluginUnocssDefaults];
99
103
  };
100
104
  resolve?: {
101
105
  /**
@@ -297,9 +301,5 @@ export type UnpackConfig = {
297
301
  * Port of [vite-plugin-svg-icons](https://github.com/vbenjs/vite-plugin-svg-icons).
298
302
  */
299
303
  svgIcons?: PluginSvgIconsOptions;
300
- /**
301
- * Unocss plugin options.
302
- */
303
- unocss?: [configOrPath?: PluginUnocssOptions | string, defaults?: PluginUnocssDefaults];
304
304
  };
305
305
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM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EAAE,CAAA;SAC7B,CAAA;KACN,CAAA;IACD;;OAEG;IACH,GAAG,CAAC,EACA,OAAO,GACP;QACE;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;QACvB;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACL;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAA;CACjC,CAAA"}
@@ -37,7 +37,7 @@ export type UnpackPlugin = {
37
37
  compiler: Rspack.Compiler;
38
38
  isFirstCompile: boolean;
39
39
  isWatch: boolean;
40
- }) => Promise<void> | void;
40
+ }) => void;
41
41
  buildEnd?: (context: {
42
42
  compiler: Rspack.Compiler;
43
43
  isFirstCompile: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAEzF,KAAK,mBAAmB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,eAAe,CAAC,CAAA;AAE1E,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,KAAK,GAAG,OAAO,CAAA;IACxB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;I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AAI,CAAA;CAC3B,CAAA;AACD,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,YAAY,EAAE,CAAA;AAC9D,MAAM,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,CAAA"}
@@ -24,6 +24,7 @@ export declare const normalizePublicPath: (base?: string) => string;
24
24
  export declare const getCompiledPkgPath: (packageName: CompiledPkgName) => string;
25
25
  export declare const getUserDepPath: (root: string, deps: string | string[]) => string | undefined;
26
26
  export declare function getTime(): string;
27
+ export declare const getFilesContentHash: (filePaths: string[]) => string;
27
28
  export declare const debounce: (fn: (...args: any[]) => any, delay: number) => (...args: any[]) => void;
28
29
  export declare const getIpv4Interfaces: () => os.NetworkInterfaceInfo[];
29
30
  type AddressUrl = {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAA;AAOxB,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE7E,eAAO,MAAe,WAAW,KAAsC,CAAA;AAEvE,eAAO,MAAiB,YAAY,KAAsC,CAAA;AAE1E,eAAO,MAAM,UAAU,QAAiC,OAAO,CAAA;AAE/D,eAAO,MAAM,UAAU,GAAI,KAAK,OAAO,SAEtC,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,aAAa,OAAO,SAEhD,CAAA;AAED,eAAO,MAAM,KAAK,QAAO,OAAyC,CAAA;AAElE,eAAO,MAAM,WAAW,QAAO,OAA4C,CAAA;AAE3E,eAAO,MAAM,MAAM,QAAO,OAAwC,CAAA;AAElE,eAAO,MAAM,KAAK,QAAO,OAAuC,CAAA;AAEhE,eAAO,MAAM,QAAQ,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,MAAiC,CAAA;AAEhF,eAAO,MAAM,SAAS,GAAI,MAAM,OAAO,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AAE,GAAG,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,WAAW,GAAE,MAA0C,GAAG,aAAa,CAmE7F;AAED,eAAO,MAAM,sBAAsB,GAAI,MAAM,MAAM,KAAG,MAYrD,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb,QAgBA;AAED,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,EAC1D,IAAI,EAAE,MAAM;;;EAkBb;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,WAExD,CAAA;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE3C,eAAO,MAAM,cAAc,GAAU,gBAAgB,MAAM,iBAqB1D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpackjs/core",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "An Rspack-based build tool",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,14 +42,14 @@
42
42
  "dependencies": {
43
43
  "@jridgewell/trace-mapping": "0.3.31",
44
44
  "@rsdoctor/rspack-plugin": "1.5.1",
45
- "@rspack/core": "1.7.4",
45
+ "@rspack/core": "1.7.5",
46
46
  "@rspack/dev-server": "1.2.1",
47
47
  "cac": "6.7.14",
48
48
  "chokidar": "5.0.0",
49
49
  "dotenv-expand": "12.0.3",
50
50
  "jiti": "2.6.1",
51
51
  "magic-string": "0.30.21",
52
- "oxc-minify": "0.111.0",
52
+ "oxc-minify": "0.112.0",
53
53
  "portfinder": "1.0.38",
54
54
  "postcss": "8.5.6",
55
55
  "stacktrace-parser": "0.1.11",