@unpackjs/core 4.7.5 → 4.8.0
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.
- package/bin/unpack.js +2 -2
- package/compiled/css-loader/index.js +20 -20
- package/compiled/less-loader/index.js +8 -8
- package/compiled/postcss-loader/index.js +8 -8
- package/compiled/sass-loader/index.js +8 -8
- package/dist/index.js +80 -60
- package/dist-types/cli/index.d.ts.map +1 -1
- package/dist-types/colors.d.ts.map +1 -1
- package/dist-types/createUnpack.d.ts +1 -2
- package/dist-types/createUnpack.d.ts.map +1 -1
- package/dist-types/plugin.d.ts +1 -0
- package/dist-types/plugin.d.ts.map +1 -1
- package/dist-types/plugins/svgIcons.d.ts.map +1 -1
- package/dist-types/plugins/unocss.d.ts.map +1 -1
- package/dist-types/rspack-config/css.d.ts.map +1 -1
- package/dist-types/rspack-config/helpers.d.ts +2 -1
- package/dist-types/rspack-config/helpers.d.ts.map +1 -1
- package/dist-types/rspack-config/index.d.ts.map +1 -1
- package/dist-types/rspack-config/nativeCss.d.ts.map +1 -1
- package/dist-types/rspack-config/plugins/progress/helpers.d.ts.map +1 -1
- package/dist-types/rspack-config/plugins/registerHooks.d.ts.map +1 -1
- package/dist-types/run/build.d.ts.map +1 -1
- package/dist-types/types/plugin.d.ts +4 -3
- package/dist-types/types/plugin.d.ts.map +1 -1
- package/package.json +4 -4
package/bin/unpack.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
4721: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(67);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(1230).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
67: (__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__(1970));
|
|
16
16
|
var _semver = __nccwpck_require__(5200);
|
|
17
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
18
|
-
var _plugins = __nccwpck_require__(
|
|
19
|
-
var _utils = __nccwpck_require__(
|
|
17
|
+
var _options = _interopRequireDefault(__nccwpck_require__(7951));
|
|
18
|
+
var _plugins = __nccwpck_require__(5104);
|
|
19
|
+
var _utils = __nccwpck_require__(1230);
|
|
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
|
-
|
|
246
|
+
5104: (__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__(
|
|
268
|
+
__nccwpck_require__(6003),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(3118),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4489));
|
|
274
274
|
function _interopRequireDefault(e) {
|
|
275
275
|
return e && e.__esModule ? e : { default: e };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
3118: (__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__(5827);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(1230);
|
|
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
|
-
|
|
382
|
+
6003: (__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__(
|
|
389
|
+
var _utils = __nccwpck_require__(1230);
|
|
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
|
-
|
|
694
|
+
4489: (__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__(
|
|
701
|
+
var _utils = __nccwpck_require__(1230);
|
|
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
|
-
|
|
1044
|
+
1230: (__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
|
-
|
|
8098
|
+
7951: (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__(
|
|
8133
|
+
var __webpack_exports__ = __nccwpck_require__(4721);
|
|
8134
8134
|
module.exports = __webpack_exports__;
|
|
8135
8135
|
})();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
996: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(26)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
26: (__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 _nodePath = _interopRequireDefault(__nccwpck_require__(760));
|
|
12
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
13
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _options = _interopRequireDefault(__nccwpck_require__(374));
|
|
13
|
+
var _utils = __nccwpck_require__(299);
|
|
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
|
-
|
|
115
|
+
299: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
116
116
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
117
117
|
exports.errorFactory = errorFactory;
|
|
118
118
|
exports.getLessImplementation = getLessImplementation;
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
760: (module) => {
|
|
315
315
|
module.exports = require("node:path");
|
|
316
316
|
},
|
|
317
|
-
|
|
317
|
+
374: (module) => {
|
|
318
318
|
module.exports = JSON.parse(
|
|
319
319
|
'{"title":"Less Loader options","type":"object","properties":{"lessOptions":{"description":"Options to pass through to `Less`.","link":"https://github.com/webpack/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/less-loader#additionalData","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack/less-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack/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/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/less-loader#lesslogaswarnorerr","type":"boolean"}},"additionalProperties":false}',
|
|
320
320
|
);
|
|
@@ -342,6 +342,6 @@
|
|
|
342
342
|
}
|
|
343
343
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
344
344
|
__nccwpck_require__.ab = __dirname + "/";
|
|
345
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
345
|
+
var __webpack_exports__ = __nccwpck_require__(996);
|
|
346
346
|
module.exports = __webpack_exports__;
|
|
347
347
|
})();
|
|
@@ -5322,19 +5322,19 @@
|
|
|
5322
5322
|
module.exports = createColors();
|
|
5323
5323
|
module.exports.createColors = createColors;
|
|
5324
5324
|
},
|
|
5325
|
-
|
|
5325
|
+
7904: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5326
5326
|
"use strict";
|
|
5327
|
-
module.exports = __nccwpck_require__(
|
|
5327
|
+
module.exports = __nccwpck_require__(46)["default"];
|
|
5328
5328
|
},
|
|
5329
|
-
|
|
5329
|
+
46: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5330
5330
|
"use strict";
|
|
5331
5331
|
var __webpack_unused_export__;
|
|
5332
5332
|
__webpack_unused_export__ = { value: true };
|
|
5333
5333
|
exports["default"] = loader;
|
|
5334
5334
|
var _nodePath = _interopRequireDefault(__nccwpck_require__(6760));
|
|
5335
5335
|
var _package = _interopRequireDefault(__nccwpck_require__(1970));
|
|
5336
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
5337
|
-
var _utils = __nccwpck_require__(
|
|
5336
|
+
var _options = _interopRequireDefault(__nccwpck_require__(8404));
|
|
5337
|
+
var _utils = __nccwpck_require__(6943);
|
|
5338
5338
|
function _interopRequireDefault(e) {
|
|
5339
5339
|
return e && e.__esModule ? e : { default: e };
|
|
5340
5340
|
}
|
|
@@ -5512,7 +5512,7 @@
|
|
|
5512
5512
|
callback(null, result.css, map, { ast });
|
|
5513
5513
|
}
|
|
5514
5514
|
},
|
|
5515
|
-
|
|
5515
|
+
6943: (module, exports, __nccwpck_require__) => {
|
|
5516
5516
|
"use strict";
|
|
5517
5517
|
module = __nccwpck_require__.nmd(module);
|
|
5518
5518
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6629,7 +6629,7 @@
|
|
|
6629
6629
|
return keywords.has(word);
|
|
6630
6630
|
}
|
|
6631
6631
|
},
|
|
6632
|
-
|
|
6632
|
+
8404: (module) => {
|
|
6633
6633
|
"use strict";
|
|
6634
6634
|
module.exports = JSON.parse(
|
|
6635
6635
|
'{"title":"PostCSS Loader options","type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","link":"https://github.com/webpack/postcss-loader#postcssOptions","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS config path.","link":"https://github.com/webpack/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/postcss-loader#execute","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack/postcss-loader#sourcemap","type":"boolean"},"implementation":{"description":"The implementation of postcss to use, instead of the locally installed version","link":"https://github.com/webpack/postcss-loader#implementation","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
|
|
@@ -6739,6 +6739,6 @@
|
|
|
6739
6739
|
})();
|
|
6740
6740
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
6741
6741
|
__nccwpck_require__.ab = __dirname + "/";
|
|
6742
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
6742
|
+
var __webpack_exports__ = __nccwpck_require__(7904);
|
|
6743
6743
|
module.exports = __webpack_exports__;
|
|
6744
6744
|
})();
|
|
@@ -4795,19 +4795,19 @@
|
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
4798
|
-
|
|
4798
|
+
456: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4799
4799
|
"use strict";
|
|
4800
|
-
const loader = __nccwpck_require__(
|
|
4800
|
+
const loader = __nccwpck_require__(54);
|
|
4801
4801
|
module.exports = loader.default;
|
|
4802
4802
|
},
|
|
4803
|
-
|
|
4803
|
+
54: (__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__(
|
|
4810
|
-
var _utils = __nccwpck_require__(
|
|
4809
|
+
var _options = _interopRequireDefault(__nccwpck_require__(150));
|
|
4810
|
+
var _utils = __nccwpck_require__(95);
|
|
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
|
-
|
|
4917
|
+
95: (__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
|
-
|
|
5571
|
+
150: (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__(
|
|
5601
|
+
var __webpack_exports__ = __nccwpck_require__(456);
|
|
5602
5602
|
module.exports = __webpack_exports__;
|
|
5603
5603
|
})();
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import * as __rspack_external_os from "os";
|
|
|
10
10
|
import * as __rspack_external_path from "path";
|
|
11
11
|
import * as __rspack_external_url from "url";
|
|
12
12
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
13
|
-
import { Compilation, rspack } from "@rspack/core";
|
|
13
|
+
import { Compilation, rspack, rspackVersion } from "@rspack/core";
|
|
14
14
|
import { exec, spawn, spawnSync } from "node:child_process";
|
|
15
15
|
import node_fs, { stat as external_node_fs_stat, unwatchFile, watch as external_node_fs_watch, watchFile } from "node:fs";
|
|
16
16
|
import node_readline from "node:readline";
|
|
@@ -2467,9 +2467,9 @@ var Command = class {
|
|
|
2467
2467
|
}), actionArgs.push(options), command.commandAction.apply(this, actionArgs);
|
|
2468
2468
|
}
|
|
2469
2469
|
};
|
|
2470
|
-
let
|
|
2471
|
-
disableColor = !!noColor || !forceColor
|
|
2472
|
-
let ANSI_SGR_RE = /\x1b\[[0-9;]*m/g, ANSI_OPEN_RE = /\x1b\[([0-9;]+)m/g, COLOR_HEX = {
|
|
2470
|
+
let colors_env = process.env, isCI = !!colors_env.CI, isTTY = !!process.stdout?.isTTY, noColor = void 0 !== colors_env.NO_COLOR && '' !== colors_env.NO_COLOR, forceColor = void 0 === colors_env.FORCE_COLOR ? void 0 : !/^(?:0|false)$/i.test(colors_env.FORCE_COLOR.trim()), disableColor = !1;
|
|
2471
|
+
disableColor = !!noColor || (void 0 !== forceColor ? !forceColor : isCI || !isTTY);
|
|
2472
|
+
let ANSI_SGR_RE = /\x1b\[[0-9;]*m/g, ANSI_OPEN_RE = /\x1b\[([0-9;]+)m/g, FG_RESET = '\x1b[39m', FG_RESET_RE = /\x1b\[39m/g, COLOR_HEX = {
|
|
2473
2473
|
brand: '#B39AFF',
|
|
2474
2474
|
red: '#F38BA8',
|
|
2475
2475
|
green: '#A6E3A1',
|
|
@@ -2492,8 +2492,20 @@ let ANSI_SGR_RE = /\x1b\[[0-9;]*m/g, ANSI_OPEN_RE = /\x1b\[([0-9;]+)m/g, COLOR_H
|
|
|
2492
2492
|
])), hexColor = (hex)=>{
|
|
2493
2493
|
if (disableColor) return (input)=>String(input);
|
|
2494
2494
|
let open = COLOR_HEX_TO_OPEN[hex];
|
|
2495
|
-
|
|
2496
|
-
|
|
2495
|
+
if (!open) return (input)=>String(input);
|
|
2496
|
+
let replacement = `${FG_RESET}${open}`;
|
|
2497
|
+
return (input)=>{
|
|
2498
|
+
let str = String(input);
|
|
2499
|
+
return `${open}${str.includes(FG_RESET) ? str.replace(FG_RESET_RE, replacement) : str}${FG_RESET}`;
|
|
2500
|
+
};
|
|
2501
|
+
}, ansi = (open, close)=>{
|
|
2502
|
+
if (disableColor) return (input)=>String(input);
|
|
2503
|
+
let closeRe = RegExp(close.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'), replacement = `${close}${open}`;
|
|
2504
|
+
return (input)=>{
|
|
2505
|
+
let str = String(input);
|
|
2506
|
+
return `${open}${str.includes(close) ? str.replace(closeRe, replacement) : str}${close}`;
|
|
2507
|
+
};
|
|
2508
|
+
}, colors = {
|
|
2497
2509
|
brand: hexColor(COLOR_HEX.brand),
|
|
2498
2510
|
red: hexColor(COLOR_HEX.red),
|
|
2499
2511
|
green: hexColor(COLOR_HEX.green),
|
|
@@ -2523,9 +2535,11 @@ let ANSI_SGR_RE = /\x1b\[[0-9;]*m/g, ANSI_OPEN_RE = /\x1b\[([0-9;]+)m/g, COLOR_H
|
|
|
2523
2535
|
COLOR_HEX_TO_OPEN[hex]
|
|
2524
2536
|
]));
|
|
2525
2537
|
function convertBasicAnsiColors(input) {
|
|
2526
|
-
let text = String(input
|
|
2538
|
+
let text = String(input);
|
|
2527
2539
|
return text ? disableColor ? text.replace(ANSI_SGR_RE, '') : text.replace(ANSI_OPEN_RE, (substring, params)=>{
|
|
2528
|
-
let tokens = params.split(';').filter(Boolean)
|
|
2540
|
+
let tokens = params.split(';').filter(Boolean);
|
|
2541
|
+
if (tokens.includes('38') || tokens.includes('48')) return substring;
|
|
2542
|
+
let colorToken = tokens.find((t)=>t in CODE_TO_OPEN);
|
|
2529
2543
|
if (!colorToken) return substring;
|
|
2530
2544
|
let open = CODE_TO_OPEN[colorToken];
|
|
2531
2545
|
if (!open) return substring;
|
|
@@ -3395,7 +3409,7 @@ let VOID_TAGS = new Set([
|
|
|
3395
3409
|
}), logger);
|
|
3396
3410
|
async function loadConfig({ cliOptions, command }) {
|
|
3397
3411
|
'build' === command ? setNodeEnv(cliOptions?.watch ? 'development' : 'production') : (setNodeEnv('development'), setDevServer(!0));
|
|
3398
|
-
let
|
|
3412
|
+
let cliRoot = cliOptions?.root ? node_path.resolve(cliOptions.root) : void 0, configFilePath = resolveConfigPath(cliRoot || process.cwd(), cliOptions?.config), configExport = {};
|
|
3399
3413
|
if (configFilePath && 'function' == typeof (configExport = await loadConfigFromFile(configFilePath))) {
|
|
3400
3414
|
let params = {
|
|
3401
3415
|
env: getNodeEnv(),
|
|
@@ -3417,7 +3431,7 @@ async function loadConfig({ cliOptions, command }) {
|
|
|
3417
3431
|
'buildAnalyze'
|
|
3418
3432
|
], cliOptions?.analyze), applyOption([
|
|
3419
3433
|
'root'
|
|
3420
|
-
],
|
|
3434
|
+
], cliRoot), applyOption([
|
|
3421
3435
|
'server',
|
|
3422
3436
|
'host'
|
|
3423
3437
|
], cliOptions?.host), configExport;
|
|
@@ -4550,15 +4564,16 @@ function getNormalizedPluginsByHook(hook) {
|
|
|
4550
4564
|
return 0 !== diff ? diff : a.index - b.index;
|
|
4551
4565
|
}).map((item)=>item.plugin);
|
|
4552
4566
|
}
|
|
4553
|
-
let
|
|
4567
|
+
let logPluginTiming = (pluginName, hook, duration)=>{
|
|
4568
|
+
logger_logger.debug(`${colors.magenta('[plugin]')} ${colors.cyan(pluginName)} ${colors.blue(hook)} ${colors.dim('in')} ${colors.yellow(`${duration.toFixed(2)}ms`)}`);
|
|
4569
|
+
}, createPluginHookTimer = (pluginName, hook)=>{
|
|
4554
4570
|
let startTime = 0;
|
|
4555
4571
|
return {
|
|
4556
4572
|
start: ()=>{
|
|
4557
4573
|
startTime = performance.now();
|
|
4558
4574
|
},
|
|
4559
4575
|
end: ()=>{
|
|
4560
|
-
|
|
4561
|
-
logger_logger.debug(`${colors.magenta('[plugin]')} ${colors.cyan(pluginName)} ${colors.blue(hook)} ${colors.dim('in')} ${colors.yellow(`${duration.toFixed(2)}ms`)}`);
|
|
4576
|
+
logPluginTiming(pluginName, hook, performance.now() - startTime);
|
|
4562
4577
|
}
|
|
4563
4578
|
};
|
|
4564
4579
|
}, transformTimingMap = globalScope[TRANSFORM_TIMING_STORE], pluginContextStore = globalScope[PLUGIN_CONTEXT_STORE], createPluginContext = (plugin)=>{
|
|
@@ -4655,7 +4670,9 @@ let getOutputFilename = ({ type, hash, async })=>{
|
|
|
4655
4670
|
sourceMap: unpackConfig.css?.sourceMap
|
|
4656
4671
|
}, unpackConfig.css?.lessLoader || {}),
|
|
4657
4672
|
parallel: !0
|
|
4658
|
-
})
|
|
4673
|
+
}), applyModuleRule = (config, rule)=>{
|
|
4674
|
+
config.module || (config.module = {}), config.module.rules || (config.module.rules = []), config.module.rules.push(rule);
|
|
4675
|
+
};
|
|
4659
4676
|
var css_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url)), nativeCss_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
4660
4677
|
let { RawSource: RawSource, SourceMapSource: SourceMapSource } = rspack.sources, isJsFile = /\.[cm]?js(\?.*)?$/i, jsMinify_PLUGIN_NAME = 'JsMinifyPlugin';
|
|
4661
4678
|
class JsMinifyPlugin {
|
|
@@ -4668,7 +4685,7 @@ class JsMinifyPlugin {
|
|
|
4668
4685
|
apply(compiler) {
|
|
4669
4686
|
let meta = JSON.stringify({
|
|
4670
4687
|
name: jsMinify_PLUGIN_NAME,
|
|
4671
|
-
version: "4.
|
|
4688
|
+
version: "4.8.0",
|
|
4672
4689
|
options: this.minifyOptions
|
|
4673
4690
|
});
|
|
4674
4691
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -4752,7 +4769,7 @@ async function compileDone(compiler, stats) {
|
|
|
4752
4769
|
(packageName = '.pnpm' === pathParts[0] && pathParts.length >= 4 ? pathParts[3].startsWith('@') ? `${pathParts[3]}/${pathParts[4]}` : pathParts[3] : pathParts[0].startsWith('@') ? `${pathParts[0]}/${pathParts[1]}` : pathParts[0]) && (nodeModulesStats[packageName] = (nodeModulesStats[packageName] || 0) + 1);
|
|
4753
4770
|
}
|
|
4754
4771
|
}), nodeModulesStats)).sort((a, b)=>a[1] - b[1])).forEach(([packageName, count], i)=>{
|
|
4755
|
-
i >= sortedStats.length -
|
|
4772
|
+
i >= sortedStats.length - 5 && logger_logger.debug(`[package] ${colors.cyan(packageName)} ${colors.yellow(count)} ${colors.dim('modules')}`);
|
|
4756
4773
|
});
|
|
4757
4774
|
}
|
|
4758
4775
|
isDebug() || logger_logger.clear(), console.log(colors.dim(getTime()), colors.cyan(`[${getCurrentUnpackConfig()._context.callerName}]`), colors.brand(utils_isDevServer() ? 'hmr update' : 'build'), `${colors.dim(fileInfo)}${sameCount > 1 ? ` ${colors.yellow(`(x${sameCount})`)}` : ''}`, isDebug() ? colors.dim(`| ${prettyTime(getCompileTime(stats))} (${stats.compilation.modules.size} modules)`) : '');
|
|
@@ -4793,13 +4810,13 @@ class RegisterHooksPlugin {
|
|
|
4793
4810
|
apply(compiler) {
|
|
4794
4811
|
let virtualModulesPlugin = new rspack.experiments.VirtualModulesPlugin();
|
|
4795
4812
|
virtualModulesPlugin.apply(compiler);
|
|
4796
|
-
let resolveIdPlugins = getNormalizedPluginsByHook('resolveId'), loadPlugins = getNormalizedPluginsByHook('load'),
|
|
4813
|
+
let resolveIdPlugins = getNormalizedPluginsByHook('resolveId'), loadPlugins = getNormalizedPluginsByHook('load'), runResolveIdHooks = async (id, importer)=>{
|
|
4797
4814
|
for (let plugin of resolveIdPlugins){
|
|
4798
4815
|
let context = createPluginContext(plugin), start = performance.now(), result = await plugin.resolveId.call(context, id, importer), duration = performance.now() - start;
|
|
4799
|
-
if (this.resolveIdTimings.set(plugin.name, (this.resolveIdTimings.get(plugin.name) || 0) + duration), 'string' == typeof result
|
|
4816
|
+
if (this.resolveIdTimings.set(plugin.name, (this.resolveIdTimings.get(plugin.name) || 0) + duration), 'string' == typeof result) return result;
|
|
4800
4817
|
}
|
|
4801
4818
|
return null;
|
|
4802
|
-
},
|
|
4819
|
+
}, runLoadHooks = async (id)=>{
|
|
4803
4820
|
for (let plugin of loadPlugins){
|
|
4804
4821
|
let context = createPluginContext(plugin), start = performance.now(), result = await plugin.load.call(context, id), duration = performance.now() - start;
|
|
4805
4822
|
if (this.loadTimings.set(plugin.name, (this.loadTimings.get(plugin.name) || 0) + duration), 'string' == typeof result) return result;
|
|
@@ -4811,10 +4828,10 @@ class RegisterHooksPlugin {
|
|
|
4811
4828
|
if (!resolveData) return;
|
|
4812
4829
|
let request = resolveData.request;
|
|
4813
4830
|
if (!request) return;
|
|
4814
|
-
let importer = resolveData.contextInfo?.issuer, resolvedId = await
|
|
4831
|
+
let importer = resolveData.contextInfo?.issuer, resolvedId = await runResolveIdHooks(request, importer) || request;
|
|
4815
4832
|
resolvedId !== request && (resolveData.request = resolvedId);
|
|
4816
|
-
let loaded = await
|
|
4817
|
-
|
|
4833
|
+
let loaded = await runLoadHooks(resolvedId);
|
|
4834
|
+
'string' == typeof loaded && this.lastLoadedModules.get(resolvedId) !== loaded && (this.lastLoadedModules.set(resolvedId, loaded), virtualModulesPlugin.writeModule(resolvedId, loaded));
|
|
4818
4835
|
});
|
|
4819
4836
|
}), compiler.hooks.compile.tap(registerHooks_PLUGIN_NAME, ()=>{
|
|
4820
4837
|
this.isCompiling = !0, this.resolveIdTimings.clear(), this.loadTimings.clear(), applyPluginsByHookSync('buildStart', (impl, context)=>{
|
|
@@ -4827,8 +4844,8 @@ class RegisterHooksPlugin {
|
|
|
4827
4844
|
});
|
|
4828
4845
|
let updateLoadedModules = async ()=>{
|
|
4829
4846
|
if (0 !== this.lastLoadedModules.size) for (let [id, prev] of this.lastLoadedModules){
|
|
4830
|
-
let loaded = await
|
|
4831
|
-
|
|
4847
|
+
let loaded = await runLoadHooks(id);
|
|
4848
|
+
'string' == typeof loaded && prev !== loaded && (this.lastLoadedModules.set(id, loaded), virtualModulesPlugin.writeModule(id, loaded));
|
|
4832
4849
|
}
|
|
4833
4850
|
};
|
|
4834
4851
|
compiler.hooks.thisCompilation.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
|
|
@@ -4858,11 +4875,11 @@ class RegisterHooksPlugin {
|
|
|
4858
4875
|
data.html = 'string' == typeof result ? result : applyHtmlTagDescriptors(data.html, result);
|
|
4859
4876
|
}), data));
|
|
4860
4877
|
}), compiler.hooks.finishMake.tap(registerHooks_PLUGIN_NAME, (compilation)=>{
|
|
4861
|
-
if (this.resolveIdTimings.size > 0) for (let [pluginName, total] of this.resolveIdTimings)
|
|
4862
|
-
if (this.loadTimings.size > 0) for (let [pluginName, total] of this.loadTimings)
|
|
4878
|
+
if (this.resolveIdTimings.size > 0) for (let [pluginName, total] of this.resolveIdTimings)logPluginTiming(pluginName, 'resolveId', total);
|
|
4879
|
+
if (this.loadTimings.size > 0) for (let [pluginName, total] of this.loadTimings)logPluginTiming(pluginName, 'load', total);
|
|
4863
4880
|
let pluginMap = transformTimingMap.get(compilation);
|
|
4864
4881
|
if (pluginMap) {
|
|
4865
|
-
for (let [pluginName, total] of pluginMap)
|
|
4882
|
+
for (let [pluginName, total] of pluginMap)logPluginTiming(pluginName, 'transform', total);
|
|
4866
4883
|
transformTimingMap.delete(compilation);
|
|
4867
4884
|
}
|
|
4868
4885
|
}), compiler.hooks.done.tapPromise(registerHooks_PLUGIN_NAME, async (stats)=>{
|
|
@@ -4883,7 +4900,7 @@ class RegisterHooksPlugin {
|
|
|
4883
4900
|
}
|
|
4884
4901
|
var rspack_config_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
4885
4902
|
async function getRspackConfig(originalUnpackConfig) {
|
|
4886
|
-
setCurrentUnpackConfig(originalUnpackConfig);
|
|
4903
|
+
logger_logger.debug('using rspack', rspackVersion), setCurrentUnpackConfig(originalUnpackConfig);
|
|
4887
4904
|
let { plugins, rspack: rspackConfig, ...rest } = originalUnpackConfig;
|
|
4888
4905
|
await applyPluginsByHook('config', async (impl, context)=>{
|
|
4889
4906
|
rest = await impl.call(context, rest, {
|
|
@@ -5136,15 +5153,15 @@ async function getRspackConfig(originalUnpackConfig) {
|
|
|
5136
5153
|
]
|
|
5137
5154
|
};
|
|
5138
5155
|
};
|
|
5139
|
-
return config
|
|
5156
|
+
return applyModuleRule(config, createStyleRule(CSS_REGEX, [
|
|
5140
5157
|
getCssLoader(unpackConfig),
|
|
5141
5158
|
unpackConfig.css?.tailwindcss && {
|
|
5142
5159
|
loader: require.resolve('@tailwindcss/webpack')
|
|
5143
5160
|
}
|
|
5144
|
-
])), config
|
|
5161
|
+
])), applyModuleRule(config, createStyleRule(LESS_REGEX, [
|
|
5145
5162
|
getCssLoader(unpackConfig),
|
|
5146
5163
|
getLessLoader(unpackConfig)
|
|
5147
|
-
])), config
|
|
5164
|
+
])), applyModuleRule(config, createStyleRule(SASS_REGEX, [
|
|
5148
5165
|
getCssLoader(unpackConfig),
|
|
5149
5166
|
getSassLoader(unpackConfig)
|
|
5150
5167
|
])), config;
|
|
@@ -5189,7 +5206,7 @@ async function getRspackConfig(originalUnpackConfig) {
|
|
|
5189
5206
|
async: !0
|
|
5190
5207
|
}),
|
|
5191
5208
|
ignoreOrder: !0
|
|
5192
|
-
})), config
|
|
5209
|
+
})), applyModuleRule(config, {
|
|
5193
5210
|
test: LESS_REGEX,
|
|
5194
5211
|
use: [
|
|
5195
5212
|
...getCommonRules({
|
|
@@ -5198,7 +5215,7 @@ async function getRspackConfig(originalUnpackConfig) {
|
|
|
5198
5215
|
getCssLoader(unpackConfig),
|
|
5199
5216
|
getLessLoader(unpackConfig)
|
|
5200
5217
|
]
|
|
5201
|
-
}), config
|
|
5218
|
+
}), applyModuleRule(config, {
|
|
5202
5219
|
test: CSS_REGEX,
|
|
5203
5220
|
use: [
|
|
5204
5221
|
...getCommonRules({
|
|
@@ -5209,7 +5226,7 @@ async function getRspackConfig(originalUnpackConfig) {
|
|
|
5209
5226
|
loader: require.resolve('@tailwindcss/webpack')
|
|
5210
5227
|
}
|
|
5211
5228
|
].filter(Boolean)
|
|
5212
|
-
}), config
|
|
5229
|
+
}), applyModuleRule(config, {
|
|
5213
5230
|
test: SASS_REGEX,
|
|
5214
5231
|
use: [
|
|
5215
5232
|
...getCommonRules({
|
|
@@ -5287,7 +5304,9 @@ async function getRspackConfig(originalUnpackConfig) {
|
|
|
5287
5304
|
}) : dist_default()(config, unpackConfig.rspack)), config;
|
|
5288
5305
|
}
|
|
5289
5306
|
async function unpackBuild(unpackConfig) {
|
|
5290
|
-
let
|
|
5307
|
+
let config = await getRspackConfig(unpackConfig);
|
|
5308
|
+
console.log(colors.brand(`${unpackConfig._context.callerName} v4.8.0`), colors.cyan(`building for ${getNodeEnv()}...`));
|
|
5309
|
+
let compiler = rspack(config), handler = (err, stats)=>{
|
|
5291
5310
|
if (err) {
|
|
5292
5311
|
console.error(err.stack || err), err.details && console.error(err.details);
|
|
5293
5312
|
return;
|
|
@@ -5405,7 +5424,7 @@ async function unpackDev(originalConfig) {
|
|
|
5405
5424
|
...middlewares
|
|
5406
5425
|
]);
|
|
5407
5426
|
let server = new RspackDevServer(devServerOptions, compiler);
|
|
5408
|
-
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v4.
|
|
5427
|
+
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v4.8.0`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - getUnpackStartTime()))} ${colors.dim('ms')}\n`), printServerUrls({
|
|
5409
5428
|
port,
|
|
5410
5429
|
host: unpackConfig.server.host,
|
|
5411
5430
|
base: unpackConfig.base
|
|
@@ -5416,14 +5435,14 @@ async function unpackDev(originalConfig) {
|
|
|
5416
5435
|
url
|
|
5417
5436
|
};
|
|
5418
5437
|
}
|
|
5419
|
-
function createUnpack({
|
|
5420
|
-
let _context = {
|
|
5438
|
+
function createUnpack({ config: userConfig, callerName = 'unpack' }) {
|
|
5439
|
+
let root = userConfig.root || process.cwd(), _context = {
|
|
5421
5440
|
callerName,
|
|
5422
|
-
version: "4.
|
|
5441
|
+
version: "4.8.0",
|
|
5423
5442
|
cachePath: 'node_modules/.unpack'
|
|
5424
5443
|
}, resolveConfig = (mode)=>{
|
|
5425
|
-
let rootPath, outputPath, basePath, cachedTraceMap, fs, isValidMethodName, parseFrame, formatOriginalLocation, formatFullStack, resolveErrorLocationAndStack,
|
|
5426
|
-
root
|
|
5444
|
+
let rootPath, outputPath, basePath, cachedTraceMap, fs, isValidMethodName, parseFrame, formatOriginalLocation, formatFullStack, resolveErrorLocationAndStack, root1, alias, shouldTransformDeepImport, preJsAssets, jsAssets, cssAssets, bundledDepsCachePath, deepImportPkgPattern, deepImportRegex, plugin, tsconfigPath, root2, uno, generated, configOrPath, defaults, VIRTUAL_UNO_CSS_ID, rootDir, isMpa, unoConfig, configFilePath, unpackConfigPath, tokens, requestedLayers, tasks, unocssCacheDir, tokensCachePath, layersCachePath, timeCachePath, configHashCachePath, generatedCachePath, bundlerCacheDir, cachedTokensSize, cachedLayersSize, isCompiling, resolveUnocssConfig, flushTasks, getVirtualModuleContent, hash, restoreSkipCode, applyUnoTransformers, options, rootPath1, registerCode, namesCode, defaultConfig = {
|
|
5445
|
+
root,
|
|
5427
5446
|
base: '/',
|
|
5428
5447
|
sourceMap: 'production' !== mode && 'cheap-module-source-map',
|
|
5429
5448
|
splitChunks: {
|
|
@@ -5810,13 +5829,13 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
5810
5829
|
return [
|
|
5811
5830
|
external_node_util_format(cleanedTemplate, ...rest)
|
|
5812
5831
|
];
|
|
5813
|
-
})(formattedArgs), prefix =
|
|
5832
|
+
})(formattedArgs), prefix = `[browser ${time}]`;
|
|
5814
5833
|
switch(level){
|
|
5815
5834
|
case 'error':
|
|
5816
|
-
console.log(colors.red(
|
|
5835
|
+
console.log(colors.red(prefix), ...outputArgs);
|
|
5817
5836
|
break;
|
|
5818
5837
|
case 'warn':
|
|
5819
|
-
console.log(colors.yellow(
|
|
5838
|
+
console.log(colors.yellow(prefix), ...outputArgs);
|
|
5820
5839
|
break;
|
|
5821
5840
|
case 'debug':
|
|
5822
5841
|
console.log(prefix, ...outputArgs);
|
|
@@ -5827,10 +5846,10 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
5827
5846
|
});
|
|
5828
5847
|
}), middlewares)
|
|
5829
5848
|
}),
|
|
5830
|
-
(
|
|
5849
|
+
(root1 = '', alias = {}, {
|
|
5831
5850
|
name: 'unpack:glob',
|
|
5832
5851
|
configResolved: (config)=>{
|
|
5833
|
-
|
|
5852
|
+
root1 = config.root, alias = config.resolve?.alias || {};
|
|
5834
5853
|
},
|
|
5835
5854
|
transform: {
|
|
5836
5855
|
filter: {
|
|
@@ -5875,18 +5894,18 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
5875
5894
|
})()`;
|
|
5876
5895
|
})({
|
|
5877
5896
|
includes: includes1.map((p)=>normalizeGlobByAliases(p, {
|
|
5878
|
-
root,
|
|
5897
|
+
root: root1,
|
|
5879
5898
|
alias
|
|
5880
5899
|
})).map(parseGlob),
|
|
5881
5900
|
excludes: excludes1.map((p)=>normalizeGlobByAliases(p, {
|
|
5882
|
-
root,
|
|
5901
|
+
root: root1,
|
|
5883
5902
|
alias
|
|
5884
5903
|
})).map(parseGlob),
|
|
5885
5904
|
eager: hasEager(rawOptions)
|
|
5886
5905
|
}) : '({})';
|
|
5887
5906
|
}
|
|
5888
5907
|
let { baseDir, regExpSource, recursive, publicPrefix } = parseGlob(normalizeGlobByAliases(pattern, {
|
|
5889
|
-
root,
|
|
5908
|
+
root: root1,
|
|
5890
5909
|
alias
|
|
5891
5910
|
}));
|
|
5892
5911
|
return (({ baseDir, regExpSource, recursive, eager, publicPrefix })=>{
|
|
@@ -6277,11 +6296,11 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
6277
6296
|
})), config;
|
|
6278
6297
|
}
|
|
6279
6298
|
},
|
|
6280
|
-
(
|
|
6299
|
+
(root2 = '', {
|
|
6281
6300
|
name: 'unpack:file-size',
|
|
6282
6301
|
apply: (config, { mode })=>'production' === mode && config.performance?.printFileSize,
|
|
6283
6302
|
configResolved (config) {
|
|
6284
|
-
|
|
6303
|
+
root2 = config.root;
|
|
6285
6304
|
},
|
|
6286
6305
|
buildEnd: async (options)=>{
|
|
6287
6306
|
let { stats } = options;
|
|
@@ -6307,7 +6326,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
6307
6326
|
color: 'cyan',
|
|
6308
6327
|
chunks: []
|
|
6309
6328
|
}
|
|
6310
|
-
], chunkGroupMap = chunkGroups.reduce((acc, cur)=>(acc[cur.type] = cur, acc), {}), distPath = stats.compilation.outputOptions.path, distFolder = node_path.relative(
|
|
6329
|
+
], chunkGroupMap = chunkGroups.reduce((acc, cur)=>(acc[cur.type] = cur, acc), {}), distPath = stats.compilation.outputOptions.path, distFolder = node_path.relative(root2, distPath), assets = Object.entries(stats.compilation.assets), longest = 0, totalSize = 0, totalCompressedSize = 0;
|
|
6311
6330
|
logUpdate('computing gzip size...'), await Promise.all(assets.map(async ([assetName, value])=>{
|
|
6312
6331
|
let content, compressedSize, filePath = assetName.split('?')[0];
|
|
6313
6332
|
try {
|
|
@@ -6507,7 +6526,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
6507
6526
|
}
|
|
6508
6527
|
}
|
|
6509
6528
|
},
|
|
6510
|
-
load: (id)=>id === VIRTUAL_UNO_CSS_ID ? getVirtualModuleContent(LAYER_MARK_ALL) : id.startsWith('uno:') ? getVirtualModuleContent(id.slice(4, -4)) :
|
|
6529
|
+
load: (id)=>id === VIRTUAL_UNO_CSS_ID ? getVirtualModuleContent(LAYER_MARK_ALL) : id.startsWith('uno:') ? getVirtualModuleContent(id.slice(4, -4)) : void 0
|
|
6511
6530
|
}),
|
|
6512
6531
|
(rootPath1 = '', registerCode = '', namesCode = '', {
|
|
6513
6532
|
name: 'unpack:svg-icons',
|
|
@@ -6528,8 +6547,10 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
6528
6547
|
registerCode = `const svgDomId = ${JSON.stringify(domId)}\nconst svgHtml = ${JSON.stringify(svg)}\nconst inject = (position) => {\n if (typeof document === 'undefined') return\n if (document.getElementById(svgDomId)) return\n const div = document.createElement('div')\n div.innerHTML = svgHtml\n const svgEl = div.firstElementChild\n if (!svgEl) return\n if (position === 'head' && document.head) {\n document.head.prepend(svgEl)\n return\n }\n const body = document.body\n if (!body) return\n if (position === 'body-first' && body.firstChild) {\n body.insertBefore(svgEl, body.firstChild)\n } else {\n body.appendChild(svgEl)\n }\n}\nconst mount = () => inject(${JSON.stringify(inject)})\nif (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', mount)\n } else {\n mount()\n }\n}\nexport default mount`, namesCode = `export const svgIconNames = ${JSON.stringify(names)}\nexport default svgIconNames`;
|
|
6529
6548
|
})();
|
|
6530
6549
|
},
|
|
6531
|
-
resolveId
|
|
6532
|
-
|
|
6550
|
+
resolveId (id) {
|
|
6551
|
+
if (id.startsWith('virtual:svg-icons-')) return '\0' + id;
|
|
6552
|
+
},
|
|
6553
|
+
load: (id)=>'\0virtual:svg-icons-register' === id ? registerCode || 'export default null' : '\0virtual:svg-icons-names' === id ? namesCode || 'export default []' : void 0
|
|
6533
6554
|
}),
|
|
6534
6555
|
{
|
|
6535
6556
|
name: 'unpack:split-chunks',
|
|
@@ -6599,7 +6620,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
6599
6620
|
let mode = watch ? 'development' : 'production';
|
|
6600
6621
|
setNodeEnv(mode);
|
|
6601
6622
|
let config = resolveConfig(mode);
|
|
6602
|
-
|
|
6623
|
+
await unpackBuild(config);
|
|
6603
6624
|
},
|
|
6604
6625
|
dev: async ()=>{
|
|
6605
6626
|
setUnpackStartTime(performance.now());
|
|
@@ -6609,7 +6630,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
6609
6630
|
return await unpackDev(config);
|
|
6610
6631
|
},
|
|
6611
6632
|
clean: ()=>{
|
|
6612
|
-
let
|
|
6633
|
+
let relativeDir = _context.cachePath, absDir = node_path.resolve(root, relativeDir);
|
|
6613
6634
|
node_fs.existsSync(absDir) ? (removeDir(absDir), logger_logger.ready(`cache cleaned: ${colors.dim(relativeDir)}`)) : logger_logger.info(`no cache found, skipping clean: ${colors.dim(relativeDir)}`);
|
|
6614
6635
|
}
|
|
6615
6636
|
};
|
|
@@ -7734,7 +7755,6 @@ async function setupUnpack(cliOptions, command) {
|
|
|
7734
7755
|
});
|
|
7735
7756
|
return await injectFrameworkPluginForDebug(userConfig), {
|
|
7736
7757
|
unpack: createUnpack({
|
|
7737
|
-
cwd: userConfig.root,
|
|
7738
7758
|
config: userConfig
|
|
7739
7759
|
}),
|
|
7740
7760
|
config: userConfig
|
|
@@ -7744,7 +7764,7 @@ function runCLI() {
|
|
|
7744
7764
|
let cli = ((name = "")=>new CAC(name))('unpack');
|
|
7745
7765
|
cli.option('-c, --config <file>', 'Use specified config file').option('-r, --root <dir>', 'Specify root directory').option('-d, --debug', 'Show debug logs');
|
|
7746
7766
|
let devCommand = cli.command('', 'Start dev server').alias('dev'), buildCommand = cli.command('build', 'Build for production'), cleanCommand = cli.command('clean', 'Clean cache directory'), upCommand = cli.command('up', 'Upgrade unpack packages to the latest');
|
|
7747
|
-
buildCommand.option('-w, --watch', 'Rebuilds when modules have changed on disk').option('--analyze', 'Analyze the
|
|
7767
|
+
buildCommand.option('-w, --watch', 'Rebuilds when modules have changed on disk').option('--analyze', 'Analyze the building process').action(withErrorHandling(async (options)=>{
|
|
7748
7768
|
let { unpack } = await setupUnpack(options, 'build');
|
|
7749
7769
|
await unpack.build({
|
|
7750
7770
|
watch: options.watch
|
|
@@ -7791,7 +7811,7 @@ function runCLI() {
|
|
|
7791
7811
|
logger_logger.clear(), logger_logger.info(`${node_path.basename(file)} changed, restarting server...`), await watcher.close(), await cleanUpBeforeRestart(), startServer(options);
|
|
7792
7812
|
});
|
|
7793
7813
|
});
|
|
7794
|
-
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.
|
|
7814
|
+
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.8.0"), cli.parse();
|
|
7795
7815
|
}
|
|
7796
7816
|
let launch_editor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/index.js");
|
|
7797
7817
|
var launch_editor_default_0 = __webpack_require__.n(launch_editor)(), src_CSS_MODULES_NAMED_EXPORT = !1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAuCA,wBAAgB,MAAM,SA+ErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;AAC5B,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAA;AACzC,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,SAAS,CAAA;IACd,KAAK,EAAE,SAAS,CAAA;IAChB,MAAM,EAAE,SAAS,CAAA;IACjB,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,SAAS,CAAA;IAClB,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,EAAE,SAAS,CAAA;IACf,GAAG,EAAE,SAAS,CAAA;CACf,CAAA;
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;AAC5B,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAA;AACzC,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,SAAS,CAAA;IACd,KAAK,EAAE,SAAS,CAAA;IAChB,MAAM,EAAE,SAAS,CAAA;IACjB,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,SAAS,CAAA;IAClB,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,EAAE,SAAS,CAAA;IACf,GAAG,EAAE,SAAS,CAAA;CACf,CAAA;AA6FD,eAAO,MAAM,MAAM,EAAE,MAWpB,CAAA;AAuBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAqB5D"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { UnpackConfig } from './types';
|
|
2
|
-
export declare function createUnpack({
|
|
3
|
-
cwd?: string;
|
|
2
|
+
export declare function createUnpack({ config: userConfig, callerName, }: {
|
|
4
3
|
config: UnpackConfig;
|
|
5
4
|
callerName?: string;
|
|
6
5
|
}): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUnpack.d.ts","sourceRoot":"","sources":["../src/createUnpack.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAW,YAAY,EAAiB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"createUnpack.d.ts","sourceRoot":"","sources":["../src/createUnpack.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAW,YAAY,EAAiB,MAAM,SAAS,CAAA;AAGnE,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EAAE,UAAU,EAClB,UAAqB,GACtB,EAAE;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;wBA8D4B;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;;;;;;EAyB/C"}
|
package/dist-types/plugin.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PluginContext, Rspack, UnpackPlugin, UnpackPluginHook } from './types';
|
|
2
2
|
export declare function getNormalizedPluginsByHook(hook: UnpackPluginHook): UnpackPlugin[];
|
|
3
3
|
type HookImpl<T extends UnpackPluginHook> = Exclude<UnpackPlugin[T], undefined>;
|
|
4
|
+
export declare const logPluginTiming: (pluginName: string, hook: UnpackPluginHook, duration: number) => void;
|
|
4
5
|
export declare const createPluginHookTimer: (pluginName: string, hook: UnpackPluginHook) => {
|
|
5
6
|
start: () => void;
|
|
6
7
|
end: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AA6CpG,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAqBjF;AAED,KAAK,QAAQ,CAAC,CAAC,SAAS,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AAE/E,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,EAAE,MAAM,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AA6CpG,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAqBjF;AAED,KAAK,QAAQ,CAAC,CAAC,SAAS,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AAE/E,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,MAAM,gBAAgB,EAAE,UAAU,MAAM,SAI3F,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,EAAE,MAAM,gBAAgB;;;CAW/E,CAAA;AAID,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,CAAC,WAAW,EAC/B,YAAY,MAAM,EAClB,UAAU,MAAM,SASjB,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,CAAC,WAAW,SAOnE,CAAA;AAID,eAAO,MAAM,mBAAmB,GAAI,QAAQ,YAAY,KAAG,aAsB1D,CAAA;AAED,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,gBAAgB,EACjE,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAC1E,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,gBAAgB,EAC/D,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,KAAK,IAAI,GAC1D,IAAI,CAkBN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svgIcons.d.ts","sourceRoot":"","sources":["../../src/plugins/svgIcons.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,WAAW,CAAA;AAoI9D,eAAO,MAAM,cAAc,QAAO,
|
|
1
|
+
{"version":3,"file":"svgIcons.d.ts","sourceRoot":"","sources":["../../src/plugins/svgIcons.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,WAAW,CAAA;AAoI9D,eAAO,MAAM,cAAc,QAAO,YAiCjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unocss.d.ts","sourceRoot":"","sources":["../../src/plugins/unocss.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAiC,YAAY,EAAE,MAAM,WAAW,CAAA;AA4E5E,eAAO,MAAM,YAAY,GAAI,KAAK,SAAS,MAAM,OAAK,
|
|
1
|
+
{"version":3,"file":"unocss.d.ts","sourceRoot":"","sources":["../../src/plugins/unocss.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAiC,YAAY,EAAE,MAAM,WAAW,CAAA;AA4E5E,eAAO,MAAM,YAAY,GAAI,KAAK,SAAS,MAAM,OAAK,YA4VrD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/rspack-config/css.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAU,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/rspack-config/css.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAU,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAWnE,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,YAAY,CA2Ef"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Rspack, UnpackConfig } from '../types';
|
|
1
|
+
import type { Rspack, RspackConfig, UnpackConfig } from '../types';
|
|
2
2
|
export declare function getEntry(root: string, customEntry: string): Promise<string>;
|
|
3
3
|
type OutputFilename = {
|
|
4
4
|
type: 'js' | 'css';
|
|
@@ -41,5 +41,6 @@ export declare const getLessLoader: (unpackConfig: UnpackConfig) => {
|
|
|
41
41
|
options: import("../types").LessLoaderOptions;
|
|
42
42
|
parallel: boolean;
|
|
43
43
|
};
|
|
44
|
+
export declare const applyModuleRule: (config: RspackConfig, rule: Rspack.RuleSetRule) => void;
|
|
44
45
|
export {};
|
|
45
46
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/rspack-config/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/rspack-config/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAInE,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAejF;AAED,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,IAAI,GAAG,KAAK,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,uBAAuB,cAAc,KAAG,MASzE,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,KAAK,GAAG,SAAS,CAAC,KAC3D,MAAM,CAAC,cAAc,EAAE,CAAA;AAElD,eAAO,MAAM,YAAY,GAAI,cAAc,YAAY;;;;;;;;;;;;;;;;CAatD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,cAAc,YAAY;;;;;;;;;;;CAUvD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,cAAc,YAAY;;;;CAevD,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,QAAQ,YAAY,EAAE,MAAM,MAAM,CAAC,WAAW,SAQ7E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rspack-config/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rspack-config/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAoB3D,wBAAsB,eAAe,CAAC,oBAAoB,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAuM/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativeCss.d.ts","sourceRoot":"","sources":["../../src/rspack-config/nativeCss.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAU,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"nativeCss.d.ts","sourceRoot":"","sources":["../../src/rspack-config/nativeCss.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAU,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAWnE,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,YAAY,CA4Df"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/rspack-config/plugins/progress/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/rspack-config/plugins/progress/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAkIvC,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,iBAqC/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerHooks.d.ts","sourceRoot":"","sources":["../../../src/rspack-config/plugins/registerHooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerHooks.d.ts","sourceRoot":"","sources":["../../../src/rspack-config/plugins/registerHooks.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,cAAc,CAAO;IAC7B,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,gBAAgB,CAA4B;IACpD,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,SAAS,CAAwC;IACzD,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CA8IvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/run/build.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/run/build.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,WAAW,CAAA;AAKrD,wBAAsB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC3E"}
|
|
@@ -34,10 +34,11 @@ export type HtmlTagDescriptor = {
|
|
|
34
34
|
*/
|
|
35
35
|
injectTo?: 'head' | 'body' | 'head-prepend' | 'body-prepend';
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
type NullValue<T = void> = T | undefined | null | void;
|
|
38
|
+
export type TransformResult = string | NullValue;
|
|
38
39
|
type TransformHtmlResult = string | HtmlTagDescriptor[];
|
|
39
|
-
type ResolveIdResult = string |
|
|
40
|
-
type LoadResult = string |
|
|
40
|
+
type ResolveIdResult = string | NullValue;
|
|
41
|
+
type LoadResult = string | NullValue;
|
|
41
42
|
export type UnpackPlugin = {
|
|
42
43
|
name: string;
|
|
43
44
|
enforce?: 'pre' | 'post';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC,KAAK,mBAAmB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAA;AAEnE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,mBAAmB,CAAA;AACzD,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,KAAK,GAAG,OAAO,CAAA;IACxB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;CACnC,CAAA;AACD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAA;IACxC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC;;OAEG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAA;IACxC,QAAQ,CAAC,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,cAAc,CAAA;CAC7D,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpackjs/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "An Rspack-based build tool",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@rsdoctor/rspack-plugin": "1.5.3",
|
|
32
|
-
"@rspack/core": "2.0.0-beta.
|
|
32
|
+
"@rspack/core": "2.0.0-beta.4",
|
|
33
33
|
"@rspack/dev-server": "1.2.1",
|
|
34
34
|
"@swc/helpers": "0.5.19",
|
|
35
35
|
"@tailwindcss/webpack": "4.2.1",
|
|
36
36
|
"jiti": "2.6.1",
|
|
37
|
-
"oxc-minify": "0.
|
|
37
|
+
"oxc-minify": "0.117.0",
|
|
38
38
|
"postcss": "8.5.8",
|
|
39
39
|
"ts-checker-rspack-plugin": "1.3.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
43
|
-
"@unocss/core": "66.6.
|
|
43
|
+
"@unocss/core": "66.6.6",
|
|
44
44
|
"cac": "7.0.0",
|
|
45
45
|
"chokidar": "5.0.0",
|
|
46
46
|
"css-loader": "7.1.4",
|