@unpackjs/core 1.7.0 → 1.7.1

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.
Files changed (50) hide show
  1. package/compiled/css-loader/index.js +22 -24
  2. package/compiled/less-loader/index.js +8 -8
  3. package/compiled/postcss-loader/index.js +8 -8
  4. package/compiled/sass-loader/index.js +8 -8
  5. package/dist/bundler-config/chunkSplit.cjs +3 -3
  6. package/dist/bundler-config/chunkSplit.d.ts +1 -1
  7. package/dist/bundler-config/chunkSplit.d.ts.map +1 -1
  8. package/dist/bundler-config/chunkSplit.js +2 -2
  9. package/dist/bundler-config/css.cjs +3 -3
  10. package/dist/bundler-config/css.d.ts +1 -1
  11. package/dist/bundler-config/css.d.ts.map +1 -1
  12. package/dist/bundler-config/css.js +2 -2
  13. package/dist/bundler-config/experimentCss.cjs +3 -3
  14. package/dist/bundler-config/experimentCss.d.ts +1 -1
  15. package/dist/bundler-config/experimentCss.d.ts.map +1 -1
  16. package/dist/bundler-config/experimentCss.js +2 -2
  17. package/dist/bundler-config/index.cjs +10 -9
  18. package/dist/bundler-config/index.d.ts.map +1 -1
  19. package/dist/bundler-config/index.js +13 -12
  20. package/dist/createUnpack.cjs +2 -2
  21. package/dist/createUnpack.js +2 -2
  22. package/dist/index.cjs +2 -2
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/logger.cjs +5 -3
  27. package/dist/logger.js +5 -3
  28. package/dist/plugin-progress/rspack.cjs +11 -4
  29. package/dist/plugin-progress/rspack.d.ts.map +1 -1
  30. package/dist/plugin-progress/rspack.js +11 -4
  31. package/dist/plugin-progress/webpack.cjs +11 -4
  32. package/dist/plugin-progress/webpack.d.ts.map +1 -1
  33. package/dist/plugin-progress/webpack.js +11 -4
  34. package/dist/prebundleDeps.cjs +19 -10
  35. package/dist/prebundleDeps.d.ts.map +1 -1
  36. package/dist/prebundleDeps.js +21 -11
  37. package/dist/run/dev.cjs +1 -1
  38. package/dist/run/dev.js +1 -1
  39. package/dist/thread-loader/worker.js +1 -1
  40. package/dist/types/config.d.ts +1 -2
  41. package/dist/types/config.d.ts.map +1 -1
  42. package/dist/types/logger.cjs +1 -0
  43. package/dist/types/logger.d.ts +2 -1
  44. package/dist/types/logger.d.ts.map +1 -1
  45. package/dist/types/logger.js +1 -0
  46. package/dist/utils.cjs +5 -0
  47. package/dist/utils.d.ts +1 -0
  48. package/dist/utils.d.ts.map +1 -1
  49. package/dist/utils.js +4 -0
  50. package/package.json +3 -3
@@ -1,22 +1,22 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 5190: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 4906: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(2375);
5
+ const loader = __nccwpck_require__(6806);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(9384).defaultGetLocalIdent;
8
+ __nccwpck_require__(433).defaultGetLocalIdent;
9
9
  },
10
- 2375: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 6806: (__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__(977));
15
15
  var _package = _interopRequireDefault(__nccwpck_require__(7337));
16
16
  var _semver = __nccwpck_require__(5204);
17
- var _options = _interopRequireDefault(__nccwpck_require__(2174));
18
- var _plugins = __nccwpck_require__(7714);
19
- var _utils = __nccwpck_require__(9384);
17
+ var _options = _interopRequireDefault(__nccwpck_require__(9991));
18
+ var _plugins = __nccwpck_require__(693);
19
+ var _utils = __nccwpck_require__(433);
20
20
  function _interopRequireDefault(obj) {
21
21
  return obj && obj.__esModule ? obj : { default: obj };
22
22
  }
@@ -243,7 +243,7 @@
243
243
  callback(null, `${importCode}${moduleCode}${exportCode}`);
244
244
  }
245
245
  },
246
- 7714: (__unused_webpack_module, exports, __nccwpck_require__) => {
246
+ 693: (__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,20 @@
265
265
  },
266
266
  });
267
267
  var _postcssImportParser = _interopRequireDefault(
268
- __nccwpck_require__(6885),
268
+ __nccwpck_require__(5785),
269
269
  );
270
- var _postcssIcssParser = _interopRequireDefault(
271
- __nccwpck_require__(5294),
272
- );
273
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6284));
270
+ var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(8e3));
271
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6206));
274
272
  function _interopRequireDefault(obj) {
275
273
  return obj && obj.__esModule ? obj : { default: obj };
276
274
  }
277
275
  },
278
- 5294: (__unused_webpack_module, exports, __nccwpck_require__) => {
276
+ 8e3: (__unused_webpack_module, exports, __nccwpck_require__) => {
279
277
  "use strict";
280
278
  Object.defineProperty(exports, "__esModule", { value: true });
281
279
  exports["default"] = void 0;
282
280
  var _icssUtils = __nccwpck_require__(4508);
283
- var _utils = __nccwpck_require__(9384);
281
+ var _utils = __nccwpck_require__(433);
284
282
  const plugin = (options = {}) => ({
285
283
  postcssPlugin: "postcss-icss-parser",
286
284
  async OnceExit(root) {
@@ -379,14 +377,14 @@
379
377
  plugin.postcss = true;
380
378
  var _default = (exports["default"] = plugin);
381
379
  },
382
- 6885: (__unused_webpack_module, exports, __nccwpck_require__) => {
380
+ 5785: (__unused_webpack_module, exports, __nccwpck_require__) => {
383
381
  "use strict";
384
382
  Object.defineProperty(exports, "__esModule", { value: true });
385
383
  exports["default"] = void 0;
386
384
  var _postcssValueParser = _interopRequireDefault(
387
385
  __nccwpck_require__(7555),
388
386
  );
389
- var _utils = __nccwpck_require__(9384);
387
+ var _utils = __nccwpck_require__(433);
390
388
  function _interopRequireDefault(obj) {
391
389
  return obj && obj.__esModule ? obj : { default: obj };
392
390
  }
@@ -691,14 +689,14 @@
691
689
  plugin.postcss = true;
692
690
  var _default = (exports["default"] = plugin);
693
691
  },
694
- 6284: (__unused_webpack_module, exports, __nccwpck_require__) => {
692
+ 6206: (__unused_webpack_module, exports, __nccwpck_require__) => {
695
693
  "use strict";
696
694
  Object.defineProperty(exports, "__esModule", { value: true });
697
695
  exports["default"] = void 0;
698
696
  var _postcssValueParser = _interopRequireDefault(
699
697
  __nccwpck_require__(7555),
700
698
  );
701
- var _utils = __nccwpck_require__(9384);
699
+ var _utils = __nccwpck_require__(433);
702
700
  function _interopRequireDefault(obj) {
703
701
  return obj && obj.__esModule ? obj : { default: obj };
704
702
  }
@@ -1041,7 +1039,7 @@
1041
1039
  plugin.postcss = true;
1042
1040
  var _default = (exports["default"] = plugin);
1043
1041
  },
1044
- 9384: (__unused_webpack_module, exports, __nccwpck_require__) => {
1042
+ 433: (__unused_webpack_module, exports, __nccwpck_require__) => {
1045
1043
  "use strict";
1046
1044
  Object.defineProperty(exports, "__esModule", { value: true });
1047
1045
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -3654,7 +3652,7 @@
3654
3652
  var _combinator = _interopRequireDefault(__nccwpck_require__(359));
3655
3653
  var _nesting = _interopRequireDefault(__nccwpck_require__(3758));
3656
3654
  var _sortAscending = _interopRequireDefault(__nccwpck_require__(9561));
3657
- var _tokenize = _interopRequireWildcard(__nccwpck_require__(9991));
3655
+ var _tokenize = _interopRequireWildcard(__nccwpck_require__(6229));
3658
3656
  var tokens = _interopRequireWildcard(__nccwpck_require__(8863));
3659
3657
  var types = _interopRequireWildcard(__nccwpck_require__(5594));
3660
3658
  var _util = __nccwpck_require__(7456);
@@ -7006,7 +7004,7 @@
7006
7004
  var combinator = -3;
7007
7005
  exports.combinator = combinator;
7008
7006
  },
7009
- 9991: (__unused_webpack_module, exports, __nccwpck_require__) => {
7007
+ 6229: (__unused_webpack_module, exports, __nccwpck_require__) => {
7010
7008
  "use strict";
7011
7009
  exports.__esModule = true;
7012
7010
  exports.FIELDS = void 0;
@@ -7964,7 +7962,7 @@
7964
7962
  "use strict";
7965
7963
  module.exports = require("util");
7966
7964
  },
7967
- 2174: (module) => {
7965
+ 9991: (module) => {
7968
7966
  "use strict";
7969
7967
  module.exports = JSON.parse(
7970
7968
  '{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/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-contrib/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-contrib/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-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/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-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/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-contrib/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-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/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-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/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-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/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-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/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-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
@@ -7999,6 +7997,6 @@
7999
7997
  }
8000
7998
  if (typeof __nccwpck_require__ !== "undefined")
8001
7999
  __nccwpck_require__.ab = __dirname + "/";
8002
- var __webpack_exports__ = __nccwpck_require__(5190);
8000
+ var __webpack_exports__ = __nccwpck_require__(4906);
8003
8001
  module.exports = __webpack_exports__;
8004
8002
  })();
@@ -1,16 +1,16 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 885: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(422)["default"];
4
+ 171: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(282)["default"];
6
6
  },
7
- 422: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 282: (__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__(17));
12
- var _options = _interopRequireDefault(__nccwpck_require__(509));
13
- var _utils = __nccwpck_require__(196);
12
+ var _options = _interopRequireDefault(__nccwpck_require__(172));
13
+ var _utils = __nccwpck_require__(844);
14
14
  function _interopRequireDefault(obj) {
15
15
  return obj && obj.__esModule ? obj : { default: obj };
16
16
  }
@@ -112,7 +112,7 @@
112
112
  }
113
113
  var _default = (exports["default"] = lessLoader);
114
114
  },
115
- 196: (__unused_webpack_module, exports, __nccwpck_require__) => {
115
+ 844: (__unused_webpack_module, exports, __nccwpck_require__) => {
116
116
  Object.defineProperty(exports, "__esModule", { value: true });
117
117
  exports.errorFactory = errorFactory;
118
118
  exports.getLessImplementation = getLessImplementation;
@@ -307,7 +307,7 @@
307
307
  17: (module) => {
308
308
  module.exports = require("path");
309
309
  },
310
- 509: (module) => {
310
+ 172: (module) => {
311
311
  module.exports = JSON.parse(
312
312
  '{"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","type":"boolean"},"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}',
313
313
  );
@@ -335,6 +335,6 @@
335
335
  }
336
336
  if (typeof __nccwpck_require__ !== "undefined")
337
337
  __nccwpck_require__.ab = __dirname + "/";
338
- var __webpack_exports__ = __nccwpck_require__(885);
338
+ var __webpack_exports__ = __nccwpck_require__(171);
339
339
  module.exports = __webpack_exports__;
340
340
  })();
@@ -93276,19 +93276,19 @@
93276
93276
  module.exports = createColors();
93277
93277
  module.exports.createColors = createColors;
93278
93278
  },
93279
- 9149: (module, __unused_webpack_exports, __nccwpck_require__) => {
93279
+ 1272: (module, __unused_webpack_exports, __nccwpck_require__) => {
93280
93280
  "use strict";
93281
- module.exports = __nccwpck_require__(7359)["default"];
93281
+ module.exports = __nccwpck_require__(6619)["default"];
93282
93282
  },
93283
- 7359: (__unused_webpack_module, exports, __nccwpck_require__) => {
93283
+ 6619: (__unused_webpack_module, exports, __nccwpck_require__) => {
93284
93284
  "use strict";
93285
93285
  var __webpack_unused_export__;
93286
93286
  __webpack_unused_export__ = { value: true };
93287
93287
  exports["default"] = loader;
93288
93288
  var _path = _interopRequireDefault(__nccwpck_require__(1017));
93289
93289
  var _package = _interopRequireDefault(__nccwpck_require__(7337));
93290
- var _options = _interopRequireDefault(__nccwpck_require__(4483));
93291
- var _utils = __nccwpck_require__(7093);
93290
+ var _options = _interopRequireDefault(__nccwpck_require__(6767));
93291
+ var _utils = __nccwpck_require__(8483);
93292
93292
  function _interopRequireDefault(obj) {
93293
93293
  return obj && obj.__esModule ? obj : { default: obj };
93294
93294
  }
@@ -93466,7 +93466,7 @@
93466
93466
  callback(null, result.css, map, { ast });
93467
93467
  }
93468
93468
  },
93469
- 7093: (module, exports, __nccwpck_require__) => {
93469
+ 8483: (module, exports, __nccwpck_require__) => {
93470
93470
  "use strict";
93471
93471
  module = __nccwpck_require__.nmd(module);
93472
93472
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -94833,7 +94833,7 @@
94833
94833
  };
94834
94834
  }
94835
94835
  },
94836
- 4483: (module) => {
94836
+ 6767: (module) => {
94837
94837
  "use strict";
94838
94838
  module.exports = JSON.parse(
94839
94839
  '{"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}',
@@ -94943,6 +94943,6 @@
94943
94943
  })();
94944
94944
  if (typeof __nccwpck_require__ !== "undefined")
94945
94945
  __nccwpck_require__.ab = __dirname + "/";
94946
- var __webpack_exports__ = __nccwpck_require__(9149);
94946
+ var __webpack_exports__ = __nccwpck_require__(1272);
94947
94947
  module.exports = __webpack_exports__;
94948
94948
  })();
@@ -4795,19 +4795,19 @@
4795
4795
  }
4796
4796
  });
4797
4797
  },
4798
- 867: (module, __unused_webpack_exports, __nccwpck_require__) => {
4798
+ 84: (module, __unused_webpack_exports, __nccwpck_require__) => {
4799
4799
  "use strict";
4800
- const loader = __nccwpck_require__(814);
4800
+ const loader = __nccwpck_require__(739);
4801
4801
  module.exports = loader.default;
4802
4802
  },
4803
- 814: (__unused_webpack_module, exports, __nccwpck_require__) => {
4803
+ 739: (__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 _url = _interopRequireDefault(__nccwpck_require__(310));
4808
4808
  var _path = _interopRequireDefault(__nccwpck_require__(17));
4809
- var _options = _interopRequireDefault(__nccwpck_require__(88));
4810
- var _utils = __nccwpck_require__(52);
4809
+ var _options = _interopRequireDefault(__nccwpck_require__(732));
4810
+ var _utils = __nccwpck_require__(813);
4811
4811
  function _interopRequireDefault(e) {
4812
4812
  return e && e.__esModule ? e : { default: e };
4813
4813
  }
@@ -4917,7 +4917,7 @@
4917
4917
  }
4918
4918
  var _default = (exports["default"] = loader);
4919
4919
  },
4920
- 52: (__unused_webpack_module, exports, __nccwpck_require__) => {
4920
+ 813: (__unused_webpack_module, exports, __nccwpck_require__) => {
4921
4921
  "use strict";
4922
4922
  Object.defineProperty(exports, "__esModule", { value: true });
4923
4923
  exports.errorFactory = errorFactory;
@@ -5577,7 +5577,7 @@
5577
5577
  "use strict";
5578
5578
  module.exports = require("url");
5579
5579
  },
5580
- 88: (module) => {
5580
+ 732: (module) => {
5581
5581
  "use strict";
5582
5582
  module.exports = JSON.parse(
5583
5583
  '{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack-contrib/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-contrib/sass-loader#sassoptions","enum":["legacy","modern","modern-compiler"]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack-contrib/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-contrib/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack-contrib/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}',
@@ -5607,6 +5607,6 @@
5607
5607
  }
5608
5608
  if (typeof __nccwpck_require__ !== "undefined")
5609
5609
  __nccwpck_require__.ab = __dirname + "/";
5610
- var __webpack_exports__ = __nccwpck_require__(867);
5610
+ var __webpack_exports__ = __nccwpck_require__(84);
5611
5611
  module.exports = __webpack_exports__;
5612
5612
  })();
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
  var chunkSplit_exports = {};
29
29
  __export(chunkSplit_exports, {
30
- addChunkSplitSupport: () => addChunkSplitSupport
30
+ applyChunkSplitConfig: () => applyChunkSplitConfig
31
31
  });
32
32
  module.exports = __toCommonJS(chunkSplit_exports);
33
33
  var import_node_assert = __toESM(require("node:assert"));
@@ -159,7 +159,7 @@ const SPLIT_STRATEGY_DISPATCHER = {
159
159
  "all-in-one": allInOne,
160
160
  "single-vendor": singleVendor
161
161
  };
162
- const addChunkSplitSupport = ({
162
+ const applyChunkSplitConfig = ({
163
163
  config,
164
164
  unpackConfig
165
165
  }) => {
@@ -183,5 +183,5 @@ const addChunkSplitSupport = ({
183
183
  };
184
184
  // Annotate the CommonJS export names for ESM import in node:
185
185
  0 && (module.exports = {
186
- addChunkSplitSupport
186
+ applyChunkSplitConfig
187
187
  });
@@ -1,5 +1,5 @@
1
1
  import type { BundlerConfiguration, UnpackConfig } from '../types/index';
2
- export declare const addChunkSplitSupport: ({ config, unpackConfig, }: {
2
+ export declare const applyChunkSplitConfig: ({ config, unpackConfig, }: {
3
3
  config: BundlerConfiguration;
4
4
  unpackConfig: UnpackConfig;
5
5
  }) => BundlerConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"chunkSplit.d.ts","sourceRoot":"","sources":["../../src/bundler-config/chunkSplit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EAKpB,YAAY,EACb,MAAM,iBAAiB,CAAA;AA4KxB,eAAO,MAAM,oBAAoB,8BAG9B;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,oBAkBH,CAAA"}
1
+ {"version":3,"file":"chunkSplit.d.ts","sourceRoot":"","sources":["../../src/bundler-config/chunkSplit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EAKpB,YAAY,EACb,MAAM,iBAAiB,CAAA;AA4KxB,eAAO,MAAM,qBAAqB,8BAG/B;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,oBAkBH,CAAA"}
@@ -136,7 +136,7 @@ const SPLIT_STRATEGY_DISPATCHER = {
136
136
  "all-in-one": allInOne,
137
137
  "single-vendor": singleVendor
138
138
  };
139
- const addChunkSplitSupport = ({
139
+ const applyChunkSplitConfig = ({
140
140
  config,
141
141
  unpackConfig
142
142
  }) => {
@@ -159,5 +159,5 @@ const addChunkSplitSupport = ({
159
159
  return config;
160
160
  };
161
161
  export {
162
- addChunkSplitSupport
162
+ applyChunkSplitConfig
163
163
  };
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
  var css_exports = {};
29
29
  __export(css_exports, {
30
- addCssSupport: () => addCssSupport
30
+ applyCssConfig: () => applyCssConfig
31
31
  });
32
32
  module.exports = __toCommonJS(css_exports);
33
33
  var import_node_path = __toESM(require("node:path"));
@@ -36,7 +36,7 @@ var import_mini_css_extract_plugin = __toESM(require("mini-css-extract-plugin"))
36
36
  var import_constants = require("../constants.cjs");
37
37
  var import_utils = require("../utils.cjs");
38
38
  var import_helper = require("./helper.cjs");
39
- function addCssSupport({
39
+ function applyCssConfig({
40
40
  config,
41
41
  unpackConfig
42
42
  }) {
@@ -163,5 +163,5 @@ function addCssSupport({
163
163
  }
164
164
  // Annotate the CommonJS export names for ESM import in node:
165
165
  0 && (module.exports = {
166
- addCssSupport
166
+ applyCssConfig
167
167
  });
@@ -1,5 +1,5 @@
1
1
  import type { BundlerConfiguration, UnpackConfig } from '../types/index';
2
- export declare function addCssSupport({ config, unpackConfig, }: {
2
+ export declare function applyCssConfig({ config, unpackConfig, }: {
3
3
  config: BundlerConfiguration;
4
4
  unpackConfig: UnpackConfig;
5
5
  }): BundlerConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/bundler-config/css.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAazE,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CAkIvB"}
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/bundler-config/css.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAazE,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CAkIvB"}
@@ -28,7 +28,7 @@ import {
28
28
  mergeConfig
29
29
  } from "../utils.js";
30
30
  import { getOutputFilename } from "./helper.js";
31
- function addCssSupport({
31
+ function applyCssConfig({
32
32
  config,
33
33
  unpackConfig
34
34
  }) {
@@ -154,5 +154,5 @@ function addCssSupport({
154
154
  return config;
155
155
  }
156
156
  export {
157
- addCssSupport
157
+ applyCssConfig
158
158
  };
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
  var experimentCss_exports = {};
29
29
  __export(experimentCss_exports, {
30
- addExperimentCssSupport: () => addExperimentCssSupport
30
+ applyExperimentCssConfig: () => applyExperimentCssConfig
31
31
  });
32
32
  module.exports = __toCommonJS(experimentCss_exports);
33
33
  var import_node_path = __toESM(require("node:path"));
@@ -35,7 +35,7 @@ var import_constants = require("../constants.cjs");
35
35
  var import_plugin = require("../typed-css-modules/plugin.cjs");
36
36
  var import_utils = require("../utils.cjs");
37
37
  var import_helper = require("./helper.cjs");
38
- function addExperimentCssSupport({
38
+ function applyExperimentCssConfig({
39
39
  config,
40
40
  unpackConfig
41
41
  }) {
@@ -162,5 +162,5 @@ function addExperimentCssSupport({
162
162
  }
163
163
  // Annotate the CommonJS export names for ESM import in node:
164
164
  0 && (module.exports = {
165
- addExperimentCssSupport
165
+ applyExperimentCssConfig
166
166
  });
@@ -1,5 +1,5 @@
1
1
  import type { BundlerConfiguration, UnpackConfig } from '../types/index';
2
- export declare function addExperimentCssSupport({ config, unpackConfig, }: {
2
+ export declare function applyExperimentCssConfig({ config, unpackConfig, }: {
3
3
  config: BundlerConfiguration;
4
4
  unpackConfig: UnpackConfig;
5
5
  }): BundlerConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"experimentCss.d.ts","sourceRoot":"","sources":["../../src/bundler-config/experimentCss.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAazE,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CA6HvB"}
1
+ {"version":3,"file":"experimentCss.d.ts","sourceRoot":"","sources":["../../src/bundler-config/experimentCss.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAazE,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CA6HvB"}
@@ -27,7 +27,7 @@ import {
27
27
  setValueByPath
28
28
  } from "../utils.js";
29
29
  import { getOutputFilename } from "./helper.js";
30
- function addExperimentCssSupport({
30
+ function applyExperimentCssConfig({
31
31
  config,
32
32
  unpackConfig
33
33
  }) {
@@ -153,5 +153,5 @@ function addExperimentCssSupport({
153
153
  return config;
154
154
  }
155
155
  export {
156
- addExperimentCssSupport
156
+ applyExperimentCssConfig
157
157
  };
@@ -54,6 +54,7 @@ const BundleAnalyzerPlugin = require("../../compiled/webpack-bundle-analyzer/ind
54
54
  const CopyWebpackPlugin = require("copy-webpack-plugin");
55
55
  async function getBundlerConfig(unpackConfig) {
56
56
  const isRspack = unpackConfig.bundler === "rspack";
57
+ const HtmlPlugin = isRspack ? import_core.rspack.HtmlRspackPlugin : import_html_webpack_plugin.default;
57
58
  const definePlugin = (define) => isRspack ? new import_core.rspack.DefinePlugin(define) : new import_esbuild_loader.EsbuildPlugin({ define, implementation: import_esbuild.default });
58
59
  const JS_FILENAME = (0, import_helper.getOutputFilename)({ type: "js", hash: unpackConfig.build?.filenameHash });
59
60
  const IgnorePlugin = isRspack ? import_core.rspack.IgnorePlugin : import_webpack2.default.IgnorePlugin;
@@ -106,13 +107,14 @@ async function getBundlerConfig(unpackConfig) {
106
107
  },
107
108
  plugins: [
108
109
  unpackConfig.define && definePlugin(unpackConfig.define),
109
- !unpackConfig.mpa && new import_html_webpack_plugin.default({
110
- template: unpackConfig.html?.template || "",
111
- templateContent: unpackConfig.html?.templateContent || !unpackConfig.html?.template && import_constants.TEMPLATE_CONTENT,
110
+ !unpackConfig.mpa && new HtmlPlugin({
111
+ template: unpackConfig.html?.template || (isRspack ? void 0 : ""),
112
+ // @ts-expect-error
113
+ templateContent: unpackConfig.html?.templateContent || (!unpackConfig.html?.template ? import_constants.TEMPLATE_CONTENT : isRspack ? void 0 : false),
112
114
  templateParameters: {
113
115
  mountId: unpackConfig.html?.mountId,
114
- title: (0, import_utils.isFunction)(unpackConfig.html?.title) ? unpackConfig.html?.title({ entryName: "index" }) : unpackConfig.html?.title,
115
- headTag: unpackConfig.html?.headTag,
116
+ title: (0, import_utils.isFunction)(unpackConfig.html?.title) ? unpackConfig.html?.title({ entryName: "index" }) : unpackConfig.html?.title || "",
117
+ headTag: unpackConfig.html?.headTag || "",
116
118
  ...unpackConfig.html?.templateParameters
117
119
  },
118
120
  minify: false,
@@ -184,19 +186,18 @@ async function getBundlerConfig(unpackConfig) {
184
186
  };
185
187
  if (unpackConfig.experiments?.css)
186
188
  import_logger.logger.warn("Experiments.css is not stable yet, please use with caution");
187
- config = unpackConfig.experiments?.css ? (0, import_experimentCss.addExperimentCssSupport)({ config, unpackConfig }) : (0, import_css.addCssSupport)({ config, unpackConfig });
188
- config = (0, import_chunkSplit.addChunkSplitSupport)({ config, unpackConfig });
189
+ config = unpackConfig.experiments?.css ? (0, import_experimentCss.applyExperimentCssConfig)({ config, unpackConfig }) : (0, import_css.applyCssConfig)({ config, unpackConfig });
190
+ config = (0, import_chunkSplit.applyChunkSplitConfig)({ config, unpackConfig });
189
191
  for (const plugin of (0, import_plugin.getNormalizedPluginsByHook)("bundlerConfig", unpackConfig.plugins)) {
190
192
  config = await plugin.bundlerConfig(config, {
191
193
  unpackConfig,
192
194
  mergeConfig: import_utils.mergeConfig,
193
- bundler: import_webpack2.default
195
+ bundler: isRspack ? import_core.rspack : import_webpack2.default
194
196
  });
195
197
  }
196
198
  if (unpackConfig.bundlerConfig) {
197
199
  if ((0, import_utils.isFunction)(unpackConfig.bundlerConfig)) {
198
200
  config = await unpackConfig.bundlerConfig(config, {
199
- bundler: unpackConfig.bundler,
200
201
  mergeConfig: import_utils.mergeConfig
201
202
  });
202
203
  } else {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAqBzE,wBAAsB,gBAAgB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA6KhG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAqBzE,wBAAsB,gBAAgB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA8KhG"}
@@ -10,7 +10,7 @@ var __filename = /* @__PURE__ */ getFilename();
10
10
  import fs from "node:fs";
11
11
  import path2 from "node:path";
12
12
  import { rspack } from "@rspack/core";
13
- import HtmlPlugin from "html-webpack-plugin";
13
+ import HtmlWebpackPlugin from "html-webpack-plugin";
14
14
  import { isDev, isDevServer, isFunction, isPlainObject, isProd, mergeConfig } from "../utils.js";
15
15
  const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
16
16
  const BundleAnalyzerPlugin = require("../../compiled/webpack-bundle-analyzer/index.js").BundleAnalyzerPlugin;
@@ -25,12 +25,13 @@ import { getNormalizedPluginsByHook } from "../plugin.js";
25
25
  import { RspackPluginProgress } from "../plugin-progress/rspack.js";
26
26
  import { WebpackPluginProgress } from "../plugin-progress/webpack.js";
27
27
  import webpack from "webpack";
28
- import { addChunkSplitSupport } from "./chunkSplit.js";
29
- import { addCssSupport } from "./css.js";
30
- import { addExperimentCssSupport } from "./experimentCss.js";
28
+ import { applyChunkSplitConfig } from "./chunkSplit.js";
29
+ import { applyCssConfig } from "./css.js";
30
+ import { applyExperimentCssConfig } from "./experimentCss.js";
31
31
  import { getEntry, getOutputFilename } from "./helper.js";
32
32
  async function getBundlerConfig(unpackConfig) {
33
33
  const isRspack = unpackConfig.bundler === "rspack";
34
+ const HtmlPlugin = isRspack ? rspack.HtmlRspackPlugin : HtmlWebpackPlugin;
34
35
  const definePlugin = (define) => isRspack ? new rspack.DefinePlugin(define) : new EsbuildPlugin({ define, implementation: esbuild });
35
36
  const JS_FILENAME = getOutputFilename({ type: "js", hash: unpackConfig.build?.filenameHash });
36
37
  const IgnorePlugin = isRspack ? rspack.IgnorePlugin : webpack.IgnorePlugin;
@@ -84,12 +85,13 @@ async function getBundlerConfig(unpackConfig) {
84
85
  plugins: [
85
86
  unpackConfig.define && definePlugin(unpackConfig.define),
86
87
  !unpackConfig.mpa && new HtmlPlugin({
87
- template: unpackConfig.html?.template || "",
88
- templateContent: unpackConfig.html?.templateContent || !unpackConfig.html?.template && TEMPLATE_CONTENT,
88
+ template: unpackConfig.html?.template || (isRspack ? void 0 : ""),
89
+ // @ts-expect-error
90
+ templateContent: unpackConfig.html?.templateContent || (!unpackConfig.html?.template ? TEMPLATE_CONTENT : isRspack ? void 0 : false),
89
91
  templateParameters: {
90
92
  mountId: unpackConfig.html?.mountId,
91
- title: isFunction(unpackConfig.html?.title) ? unpackConfig.html?.title({ entryName: "index" }) : unpackConfig.html?.title,
92
- headTag: unpackConfig.html?.headTag,
93
+ title: isFunction(unpackConfig.html?.title) ? unpackConfig.html?.title({ entryName: "index" }) : unpackConfig.html?.title || "",
94
+ headTag: unpackConfig.html?.headTag || "",
93
95
  ...unpackConfig.html?.templateParameters
94
96
  },
95
97
  minify: false,
@@ -161,19 +163,18 @@ async function getBundlerConfig(unpackConfig) {
161
163
  };
162
164
  if (unpackConfig.experiments?.css)
163
165
  logger.warn("Experiments.css is not stable yet, please use with caution");
164
- config = unpackConfig.experiments?.css ? addExperimentCssSupport({ config, unpackConfig }) : addCssSupport({ config, unpackConfig });
165
- config = addChunkSplitSupport({ config, unpackConfig });
166
+ config = unpackConfig.experiments?.css ? applyExperimentCssConfig({ config, unpackConfig }) : applyCssConfig({ config, unpackConfig });
167
+ config = applyChunkSplitConfig({ config, unpackConfig });
166
168
  for (const plugin of getNormalizedPluginsByHook("bundlerConfig", unpackConfig.plugins)) {
167
169
  config = await plugin.bundlerConfig(config, {
168
170
  unpackConfig,
169
171
  mergeConfig,
170
- bundler: webpack
172
+ bundler: isRspack ? rspack : webpack
171
173
  });
172
174
  }
173
175
  if (unpackConfig.bundlerConfig) {
174
176
  if (isFunction(unpackConfig.bundlerConfig)) {
175
177
  config = await unpackConfig.bundlerConfig(config, {
176
- bundler: unpackConfig.bundler,
177
178
  mergeConfig
178
179
  });
179
180
  } else {
@@ -76,7 +76,7 @@ function createUnpack() {
76
76
  build: async (unpackConfig) => {
77
77
  (0, import_utils.setNodeEnv)("production");
78
78
  console.log(
79
- import_colors.default.rainbow(`unpack v${"1.7.0"}`),
79
+ import_colors.default.rainbow(`unpack v${"1.7.1"}`),
80
80
  import_colors.default.green("building for production...")
81
81
  );
82
82
  const config = await resolveConfig(unpackConfig);
@@ -92,7 +92,7 @@ function createUnpack() {
92
92
  watch: async (unpackConfig) => {
93
93
  (0, import_utils.setNodeEnv)("development");
94
94
  console.log(
95
- import_colors.default.rainbow(`unpack v${"1.7.0"}`),
95
+ import_colors.default.rainbow(`unpack v${"1.7.1"}`),
96
96
  import_colors.default.green("building for development...")
97
97
  );
98
98
  const config = await resolveConfig(unpackConfig);