@unpackjs/core 3.6.1 → 3.7.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/compiled/css-loader/index.js +20 -20
- package/compiled/less-loader/index.js +8 -8
- package/compiled/postcss-loader/index.js +34 -34
- package/compiled/sass-loader/index.js +8 -8
- package/dist/index.js +24 -19
- package/dist/transformDeepImportLoader.mjs +7 -11
- package/dist/typedCssModulesLoader.mjs +3 -3
- package/dist-types/bundler-config/loaders/transformDeepImportLoader.d.ts.map +1 -1
- package/dist-types/createUnpack.d.ts +1 -0
- package/dist-types/createUnpack.d.ts.map +1 -1
- package/dist-types/prebundleDeps.d.ts.map +1 -1
- package/dist-types/utils.d.ts +1 -1
- package/dist-types/utils.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
8578: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(7984);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(6441).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
7984: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11
11
|
"use strict";
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports["default"] = loader;
|
|
14
14
|
var _postcss = _interopRequireDefault(__nccwpck_require__(1940));
|
|
15
15
|
var _package = _interopRequireDefault(__nccwpck_require__(444));
|
|
16
16
|
var _semver = __nccwpck_require__(5200);
|
|
17
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
18
|
-
var _plugins = __nccwpck_require__(
|
|
19
|
-
var _utils = __nccwpck_require__(
|
|
17
|
+
var _options = _interopRequireDefault(__nccwpck_require__(514));
|
|
18
|
+
var _plugins = __nccwpck_require__(4639);
|
|
19
|
+
var _utils = __nccwpck_require__(6441);
|
|
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
|
-
|
|
246
|
+
4639: (__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__(7852),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(9193),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6384));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
9193: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
279
279
|
"use strict";
|
|
280
280
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
281
281
|
exports["default"] = void 0;
|
|
282
282
|
var _icssUtils = __nccwpck_require__(229);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(6441);
|
|
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
|
+
7852: (__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__(6441);
|
|
390
390
|
function _interopRequireDefault(obj) {
|
|
391
391
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
392
392
|
}
|
|
@@ -691,14 +691,14 @@
|
|
|
691
691
|
plugin.postcss = true;
|
|
692
692
|
var _default = (exports["default"] = plugin);
|
|
693
693
|
},
|
|
694
|
-
|
|
694
|
+
6384: (__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__(6441);
|
|
702
702
|
function _interopRequireDefault(obj) {
|
|
703
703
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
704
704
|
}
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
plugin.postcss = true;
|
|
1042
1042
|
var _default = (exports["default"] = plugin);
|
|
1043
1043
|
},
|
|
1044
|
-
|
|
1044
|
+
6441: (__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;
|
|
@@ -8086,7 +8086,7 @@
|
|
|
8086
8086
|
"use strict";
|
|
8087
8087
|
module.exports = require("util");
|
|
8088
8088
|
},
|
|
8089
|
-
|
|
8089
|
+
514: (module) => {
|
|
8090
8090
|
"use strict";
|
|
8091
8091
|
module.exports = JSON.parse(
|
|
8092
8092
|
'{"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"}',
|
|
@@ -8121,6 +8121,6 @@
|
|
|
8121
8121
|
}
|
|
8122
8122
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8123
8123
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8124
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8124
|
+
var __webpack_exports__ = __nccwpck_require__(8578);
|
|
8125
8125
|
module.exports = __webpack_exports__;
|
|
8126
8126
|
})();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
430: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(604)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
604: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
12
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
13
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _options = _interopRequireDefault(__nccwpck_require__(78));
|
|
13
|
+
var _utils = __nccwpck_require__(349);
|
|
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
|
+
349: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
116
116
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
117
117
|
exports.errorFactory = errorFactory;
|
|
118
118
|
exports.getLessImplementation = getLessImplementation;
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
928: (module) => {
|
|
313
313
|
module.exports = require("path");
|
|
314
314
|
},
|
|
315
|
-
|
|
315
|
+
78: (module) => {
|
|
316
316
|
module.exports = JSON.parse(
|
|
317
317
|
'{"title":"Less Loader options","type":"object","properties":{"lessOptions":{"description":"Options to pass through to `Less`.","link":"https://github.com/webpack-contrib/less-loader#lessoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Less` code to the actual entry file.","link":"https://github.com/webpack-contrib/less-loader#additionalData","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/less-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/less-loader#webpackimporter","anyOf":[{"type":"boolean"},{"type":"string","enum":["only"]}]},"implementation":{"description":"The implementation of the `Less` to be used.","link":"https://github.com/webpack-contrib/less-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"lessLogAsWarnOrErr":{"description":"Less warnings and errors will be webpack warnings or errors.","link":"https://github.com/webpack-contrib/less-loader#lesslogaswarnorerr","type":"boolean"}},"additionalProperties":false}',
|
|
318
318
|
);
|
|
@@ -340,6 +340,6 @@
|
|
|
340
340
|
}
|
|
341
341
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
342
342
|
__nccwpck_require__.ab = __dirname + "/";
|
|
343
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
343
|
+
var __webpack_exports__ = __nccwpck_require__(430);
|
|
344
344
|
module.exports = __webpack_exports__;
|
|
345
345
|
})();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
module.exports = callsites;
|
|
13
13
|
module.exports["default"] = callsites;
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
3437: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
16
16
|
"use strict";
|
|
17
17
|
var __importDefault =
|
|
18
18
|
(this && this.__importDefault) ||
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
exports.Explorer = void 0;
|
|
24
24
|
const promises_1 = __importDefault(__nccwpck_require__(1943));
|
|
25
25
|
const path_1 = __importDefault(__nccwpck_require__(6928));
|
|
26
|
-
const defaults_1 = __nccwpck_require__(
|
|
27
|
-
const ExplorerBase_js_1 = __nccwpck_require__(
|
|
28
|
-
const merge_1 = __nccwpck_require__(
|
|
29
|
-
const util_js_1 = __nccwpck_require__(
|
|
26
|
+
const defaults_1 = __nccwpck_require__(5604);
|
|
27
|
+
const ExplorerBase_js_1 = __nccwpck_require__(6636);
|
|
28
|
+
const merge_1 = __nccwpck_require__(6332);
|
|
29
|
+
const util_js_1 = __nccwpck_require__(6154);
|
|
30
30
|
class Explorer extends ExplorerBase_js_1.ExplorerBase {
|
|
31
31
|
async load(filepath) {
|
|
32
32
|
filepath = path_1.default.resolve(filepath);
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
}
|
|
225
225
|
exports.Explorer = Explorer;
|
|
226
226
|
},
|
|
227
|
-
|
|
227
|
+
6636: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
228
228
|
"use strict";
|
|
229
229
|
var __importDefault =
|
|
230
230
|
(this && this.__importDefault) ||
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
const env_paths_1 = __importDefault(__nccwpck_require__(966));
|
|
237
237
|
const os_1 = __importDefault(__nccwpck_require__(857));
|
|
238
238
|
const path_1 = __importDefault(__nccwpck_require__(6928));
|
|
239
|
-
const util_js_1 = __nccwpck_require__(
|
|
239
|
+
const util_js_1 = __nccwpck_require__(6154);
|
|
240
240
|
class ExplorerBase {
|
|
241
241
|
#loadingMetaConfig = false;
|
|
242
242
|
config;
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
}
|
|
365
365
|
exports.getExtensionDescription = getExtensionDescription;
|
|
366
366
|
},
|
|
367
|
-
|
|
367
|
+
3202: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
368
368
|
"use strict";
|
|
369
369
|
var __importDefault =
|
|
370
370
|
(this && this.__importDefault) ||
|
|
@@ -375,10 +375,10 @@
|
|
|
375
375
|
exports.ExplorerSync = void 0;
|
|
376
376
|
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
|
377
377
|
const path_1 = __importDefault(__nccwpck_require__(6928));
|
|
378
|
-
const defaults_1 = __nccwpck_require__(
|
|
379
|
-
const ExplorerBase_js_1 = __nccwpck_require__(
|
|
380
|
-
const merge_1 = __nccwpck_require__(
|
|
381
|
-
const util_js_1 = __nccwpck_require__(
|
|
378
|
+
const defaults_1 = __nccwpck_require__(5604);
|
|
379
|
+
const ExplorerBase_js_1 = __nccwpck_require__(6636);
|
|
380
|
+
const merge_1 = __nccwpck_require__(6332);
|
|
381
|
+
const util_js_1 = __nccwpck_require__(6154);
|
|
382
382
|
class ExplorerSync extends ExplorerBase_js_1.ExplorerBase {
|
|
383
383
|
load(filepath) {
|
|
384
384
|
filepath = path_1.default.resolve(filepath);
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
}
|
|
564
564
|
exports.ExplorerSync = ExplorerSync;
|
|
565
565
|
},
|
|
566
|
-
|
|
566
|
+
5604: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
567
567
|
"use strict";
|
|
568
568
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
569
569
|
exports.defaultLoadersSync =
|
|
@@ -574,7 +574,7 @@
|
|
|
574
574
|
exports.getDefaultSearchPlacesSync =
|
|
575
575
|
exports.getDefaultSearchPlaces =
|
|
576
576
|
void 0;
|
|
577
|
-
const loaders_1 = __nccwpck_require__(
|
|
577
|
+
const loaders_1 = __nccwpck_require__(2832);
|
|
578
578
|
function getDefaultSearchPlaces(moduleName) {
|
|
579
579
|
return [
|
|
580
580
|
"package.json",
|
|
@@ -674,7 +674,7 @@
|
|
|
674
674
|
noExt: loaders_1.loadYaml,
|
|
675
675
|
});
|
|
676
676
|
},
|
|
677
|
-
|
|
677
|
+
592: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
678
678
|
"use strict";
|
|
679
679
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
680
680
|
exports.defaultLoadersSync =
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
exports.cosmiconfigSync =
|
|
687
687
|
exports.cosmiconfig =
|
|
688
688
|
void 0;
|
|
689
|
-
const defaults_1 = __nccwpck_require__(
|
|
689
|
+
const defaults_1 = __nccwpck_require__(5604);
|
|
690
690
|
Object.defineProperty(exports, "defaultLoaders", {
|
|
691
691
|
enumerable: true,
|
|
692
692
|
get: function () {
|
|
@@ -723,9 +723,9 @@
|
|
|
723
723
|
return defaults_1.globalConfigSearchPlacesSync;
|
|
724
724
|
},
|
|
725
725
|
});
|
|
726
|
-
const Explorer_js_1 = __nccwpck_require__(
|
|
727
|
-
const ExplorerSync_js_1 = __nccwpck_require__(
|
|
728
|
-
const util_1 = __nccwpck_require__(
|
|
726
|
+
const Explorer_js_1 = __nccwpck_require__(3437);
|
|
727
|
+
const ExplorerSync_js_1 = __nccwpck_require__(3202);
|
|
728
|
+
const util_1 = __nccwpck_require__(6154);
|
|
729
729
|
const identity = function identity(x) {
|
|
730
730
|
return x;
|
|
731
731
|
};
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
}
|
|
876
876
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
877
877
|
},
|
|
878
|
-
|
|
878
|
+
2832: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
879
879
|
"use strict";
|
|
880
880
|
var __importDefault =
|
|
881
881
|
(this && this.__importDefault) ||
|
|
@@ -905,7 +905,7 @@
|
|
|
905
905
|
const loadJs = async function loadJs(filepath) {
|
|
906
906
|
try {
|
|
907
907
|
const { href } = (0, url_1.pathToFileURL)(filepath);
|
|
908
|
-
return (await __nccwpck_require__(
|
|
908
|
+
return (await __nccwpck_require__(5528)(href)).default;
|
|
909
909
|
} catch (error) {
|
|
910
910
|
try {
|
|
911
911
|
return (0, exports.loadJsSync)(filepath, "");
|
|
@@ -1040,7 +1040,7 @@
|
|
|
1040
1040
|
return;
|
|
1041
1041
|
}
|
|
1042
1042
|
},
|
|
1043
|
-
|
|
1043
|
+
6332: (__unused_webpack_module, exports) => {
|
|
1044
1044
|
"use strict";
|
|
1045
1045
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1046
1046
|
exports.mergeAll = exports.hasOwn = void 0;
|
|
@@ -1079,7 +1079,7 @@
|
|
|
1079
1079
|
}
|
|
1080
1080
|
exports.mergeAll = mergeAll;
|
|
1081
1081
|
},
|
|
1082
|
-
|
|
1082
|
+
6154: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
1083
1083
|
"use strict";
|
|
1084
1084
|
var __createBinding =
|
|
1085
1085
|
(this && this.__createBinding) ||
|
|
@@ -5319,19 +5319,19 @@
|
|
|
5319
5319
|
module.exports = createColors();
|
|
5320
5320
|
module.exports.createColors = createColors;
|
|
5321
5321
|
},
|
|
5322
|
-
|
|
5322
|
+
2376: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5323
5323
|
"use strict";
|
|
5324
|
-
module.exports = __nccwpck_require__(
|
|
5324
|
+
module.exports = __nccwpck_require__(2598)["default"];
|
|
5325
5325
|
},
|
|
5326
|
-
|
|
5326
|
+
2598: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5327
5327
|
"use strict";
|
|
5328
5328
|
var __webpack_unused_export__;
|
|
5329
5329
|
__webpack_unused_export__ = { value: true };
|
|
5330
5330
|
exports["default"] = loader;
|
|
5331
5331
|
var _nodePath = _interopRequireDefault(__nccwpck_require__(6760));
|
|
5332
5332
|
var _package = _interopRequireDefault(__nccwpck_require__(444));
|
|
5333
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
5334
|
-
var _utils = __nccwpck_require__(
|
|
5333
|
+
var _options = _interopRequireDefault(__nccwpck_require__(6262));
|
|
5334
|
+
var _utils = __nccwpck_require__(1639);
|
|
5335
5335
|
function _interopRequireDefault(e) {
|
|
5336
5336
|
return e && e.__esModule ? e : { default: e };
|
|
5337
5337
|
}
|
|
@@ -5509,7 +5509,7 @@
|
|
|
5509
5509
|
callback(null, result.css, map, { ast });
|
|
5510
5510
|
}
|
|
5511
5511
|
},
|
|
5512
|
-
|
|
5512
|
+
1639: (module, exports, __nccwpck_require__) => {
|
|
5513
5513
|
"use strict";
|
|
5514
5514
|
module = __nccwpck_require__.nmd(module);
|
|
5515
5515
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5525,7 +5525,7 @@
|
|
|
5525
5525
|
var _nodeModule = _interopRequireDefault(__nccwpck_require__(8995));
|
|
5526
5526
|
var _nodePath = _interopRequireDefault(__nccwpck_require__(6760));
|
|
5527
5527
|
var _nodeUrl = _interopRequireDefault(__nccwpck_require__(3136));
|
|
5528
|
-
var _cosmiconfig = __nccwpck_require__(
|
|
5528
|
+
var _cosmiconfig = __nccwpck_require__(592);
|
|
5529
5529
|
function _interopRequireDefault(e) {
|
|
5530
5530
|
return e && e.__esModule ? e : { default: e };
|
|
5531
5531
|
}
|
|
@@ -6046,7 +6046,7 @@
|
|
|
6046
6046
|
module.exports.silent = (fromDir, moduleId) =>
|
|
6047
6047
|
resolveFrom(fromDir, moduleId, true);
|
|
6048
6048
|
},
|
|
6049
|
-
|
|
6049
|
+
5528: (module) => {
|
|
6050
6050
|
function webpackEmptyAsyncContext(req) {
|
|
6051
6051
|
return Promise.resolve().then(() => {
|
|
6052
6052
|
var e = new Error("Cannot find module '" + req + "'");
|
|
@@ -6056,7 +6056,7 @@
|
|
|
6056
6056
|
}
|
|
6057
6057
|
webpackEmptyAsyncContext.keys = () => [];
|
|
6058
6058
|
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
|
|
6059
|
-
webpackEmptyAsyncContext.id =
|
|
6059
|
+
webpackEmptyAsyncContext.id = 5528;
|
|
6060
6060
|
module.exports = webpackEmptyAsyncContext;
|
|
6061
6061
|
},
|
|
6062
6062
|
5200: (module) => {
|
|
@@ -6620,7 +6620,7 @@
|
|
|
6620
6620
|
return keywords.has(word);
|
|
6621
6621
|
}
|
|
6622
6622
|
},
|
|
6623
|
-
|
|
6623
|
+
6262: (module) => {
|
|
6624
6624
|
"use strict";
|
|
6625
6625
|
module.exports = JSON.parse(
|
|
6626
6626
|
'{"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}',
|
|
@@ -6730,6 +6730,6 @@
|
|
|
6730
6730
|
})();
|
|
6731
6731
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
6732
6732
|
__nccwpck_require__.ab = __dirname + "/";
|
|
6733
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
6733
|
+
var __webpack_exports__ = __nccwpck_require__(2376);
|
|
6734
6734
|
module.exports = __webpack_exports__;
|
|
6735
6735
|
})();
|
|
@@ -4795,19 +4795,19 @@
|
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
4798
|
-
|
|
4798
|
+
446: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4799
4799
|
"use strict";
|
|
4800
|
-
const loader = __nccwpck_require__(
|
|
4800
|
+
const loader = __nccwpck_require__(380);
|
|
4801
4801
|
module.exports = loader.default;
|
|
4802
4802
|
},
|
|
4803
|
-
|
|
4803
|
+
380: (__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__(786));
|
|
4810
|
+
var _utils = __nccwpck_require__(669);
|
|
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
|
+
669: (__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
|
+
786: (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__(446);
|
|
5602
5602
|
module.exports = __webpack_exports__;
|
|
5603
5603
|
})();
|
package/dist/index.js
CHANGED
|
@@ -19,10 +19,10 @@ import { exec, spawn } from "node:child_process";
|
|
|
19
19
|
import node_http from "node:http";
|
|
20
20
|
import chokidar from "chokidar";
|
|
21
21
|
var LogColor, __webpack_modules__ = {
|
|
22
|
-
"compiled/launch-editor"
|
|
22
|
+
"compiled/launch-editor" (module) {
|
|
23
23
|
module.exports = __rspack_external__compiled_launch_editor_index_js_29002383;
|
|
24
24
|
},
|
|
25
|
-
"compiled/webpack-merge"
|
|
25
|
+
"compiled/webpack-merge" (module) {
|
|
26
26
|
module.exports = __rspack_external__compiled_webpack_merge_index_js_efd91626;
|
|
27
27
|
}
|
|
28
28
|
}, __webpack_module_cache__ = {};
|
|
@@ -137,8 +137,8 @@ let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULE
|
|
|
137
137
|
</body>
|
|
138
138
|
|
|
139
139
|
</html>`;
|
|
140
|
-
var utils_dirname =
|
|
141
|
-
let { merge } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
|
|
140
|
+
var utils_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
141
|
+
let { merge: mergeConfig } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
|
|
142
142
|
process.env.NODE_ENV = env;
|
|
143
143
|
}, setDevServer = (isDevServer)=>{
|
|
144
144
|
process.env.DEV_SERVER = isDevServer ? 'true' : 'false';
|
|
@@ -237,7 +237,7 @@ let debounce = (fn, delay)=>{
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
msg && console.log(` ${msg} ${colors.dim('in')} ${colors.yellow(`${(performance.now() - lastTrackTime).toFixed(2)}ms`)}`), lastTrackTime = performance.now();
|
|
240
|
-
}, getPathInJs = (absPath)=>JSON.stringify(absPath).slice(1, -1),
|
|
240
|
+
}, getPathInJs = (absPath)=>JSON.stringify(absPath).slice(1, -1), getUserDepVersion = (root, dep)=>{
|
|
241
241
|
let depPath = getUserDepPath(root, dep);
|
|
242
242
|
if (depPath) return JSON.parse(node_fs.readFileSync(node_path.resolve(depPath, 'package.json'), 'utf-8')).version;
|
|
243
243
|
}, clearLine = ()=>{
|
|
@@ -407,7 +407,7 @@ async function setupCliShortcuts({ help = !0, openPage, closeServer, printUrls,
|
|
|
407
407
|
for (let shortcut of shortcuts)if (input === shortcut.key) return void shortcut.action();
|
|
408
408
|
}), addRestartCleaner(()=>rl.close());
|
|
409
409
|
}
|
|
410
|
-
var config_filename =
|
|
410
|
+
var config_filename = __rspack_fileURLToPath(import.meta.url);
|
|
411
411
|
async function loadConfig({ cliOptions, command }) {
|
|
412
412
|
'build' === command ? setNodeEnv(cliOptions?.watch ? 'development' : 'production') : (setNodeEnv('development'), setDevServer(!0));
|
|
413
413
|
let root = cliOptions?.root ? node_path.resolve(cliOptions.root) : process.cwd(), configFilePath = resolveConfigPath(root, cliOptions?.config), configExport = {};
|
|
@@ -666,7 +666,7 @@ let getOutputFilename = ({ type, hash, async })=>{
|
|
|
666
666
|
let FILENAME = isProd() && !1 !== hash ? PROD_DEFAULT_FILENAME : DEV_DEFAULT_FILENAME;
|
|
667
667
|
return async ? 'js' === type ? FILENAME.jsAsync : FILENAME.cssAsync : FILENAME[type];
|
|
668
668
|
};
|
|
669
|
-
var css_dirname =
|
|
669
|
+
var css_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
670
670
|
function _define_property(obj, key, value) {
|
|
671
671
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
672
672
|
value: value,
|
|
@@ -680,7 +680,7 @@ class JsMinifyPlugin {
|
|
|
680
680
|
apply(compiler) {
|
|
681
681
|
let meta = JSON.stringify({
|
|
682
682
|
name: jsMinify_PLUGIN_NAME,
|
|
683
|
-
version: "3.
|
|
683
|
+
version: "3.7.0",
|
|
684
684
|
options: this.minifyOptions
|
|
685
685
|
});
|
|
686
686
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -1499,7 +1499,7 @@ async function unpackBuild(unpackConfig) {
|
|
|
1499
1499
|
};
|
|
1500
1500
|
isWatch() ? compiler.watch({}, handler) : compiler.run(handler);
|
|
1501
1501
|
}
|
|
1502
|
-
var openBrowser_dirname =
|
|
1502
|
+
var openBrowser_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
1503
1503
|
async function openBrowser(url) {
|
|
1504
1504
|
if ('darwin' === process.platform) try {
|
|
1505
1505
|
let ps = await execAsync('ps cax'), openedBrowser = [
|
|
@@ -1562,7 +1562,7 @@ function execAsync(command, options) {
|
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
}
|
|
1565
|
-
var prebundleDeps_dirname =
|
|
1565
|
+
var prebundleDeps_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
1566
1566
|
let SPECIAL_NO_ENTRY_DEPS = [
|
|
1567
1567
|
'@iconify-icons/material-symbols'
|
|
1568
1568
|
], getExternalLibraryName = (pkgName)=>{
|
|
@@ -1578,7 +1578,8 @@ let SPECIAL_NO_ENTRY_DEPS = [
|
|
|
1578
1578
|
total: 0,
|
|
1579
1579
|
bundled: 0
|
|
1580
1580
|
}, failedDeps = [], root = unpackConfig.root, CACHE_PATH = unpackConfig._context.cachePath, failedDepsCachePath = node_path.resolve(root, CACHE_PATH, 'failed-deps.json'), failedCache = node_fs.existsSync(failedDepsCachePath) ? JSON.parse(node_fs.readFileSync(failedDepsCachePath, 'utf-8')) : {}, updateProgress = ()=>{
|
|
1581
|
-
|
|
1581
|
+
let errMsg = failedDeps.length > 0 ? ` failed: ${failedDeps.join(', ')}` : '';
|
|
1582
|
+
logUpdate(`${colors.magenta('»')} optimizing dependencies (${count.bundled}/${count.total})${errMsg}`), count.total === count.bundled + failedDeps.length && console.log();
|
|
1582
1583
|
}, userOptions = isPlainObject(unpackConfig.dev?.prebundle) ? unpackConfig.dev.prebundle : {}, ignoreCSSDeps = userOptions.ignoreCSS || [], packageJson = JSON.parse(node_fs.readFileSync(node_path.resolve(root, 'package.json'), 'utf-8')), excludeDeps = [
|
|
1583
1584
|
...(externals = unpackConfig.externals, existExternals = new Set(), Array.isArray(externals) ? externals.forEach((item)=>{
|
|
1584
1585
|
isPlainObject(item) && Object.keys(item).forEach((key)=>{
|
|
@@ -1588,7 +1589,7 @@ let SPECIAL_NO_ENTRY_DEPS = [
|
|
|
1588
1589
|
existExternals.add(key);
|
|
1589
1590
|
}), Array.from(existExternals) || []),
|
|
1590
1591
|
...userOptions.exclude || []
|
|
1591
|
-
],
|
|
1592
|
+
], needBundleDeps = Object.keys(packageJson.dependencies).filter((pkgName)=>!excludeDeps.includes(pkgName)).map((pkgName)=>{
|
|
1592
1593
|
let packageJson = JSON.parse(node_fs.readFileSync(node_path.resolve(root, 'node_modules', pkgName, 'package.json'), 'utf-8')), version = packageJson.version;
|
|
1593
1594
|
if (failedCache[pkgName] === version) return;
|
|
1594
1595
|
let entry = ((packageJson)=>{
|
|
@@ -1632,7 +1633,7 @@ let SPECIAL_NO_ENTRY_DEPS = [
|
|
|
1632
1633
|
version
|
|
1633
1634
|
};
|
|
1634
1635
|
}
|
|
1635
|
-
|
|
1636
|
+
failedCache[pkgName] = version;
|
|
1636
1637
|
return;
|
|
1637
1638
|
}
|
|
1638
1639
|
return {
|
|
@@ -1764,7 +1765,7 @@ let SPECIAL_NO_ENTRY_DEPS = [
|
|
|
1764
1765
|
}))(depInfo)));
|
|
1765
1766
|
cacheDir = node_path.dirname(failedDepsCachePath), node_fs.existsSync(cacheDir) || node_fs.mkdirSync(cacheDir, {
|
|
1766
1767
|
recursive: !0
|
|
1767
|
-
}), node_fs.writeFileSync(failedDepsCachePath, JSON.stringify(failedCache, null, 2), 'utf-8')
|
|
1768
|
+
}), node_fs.writeFileSync(failedDepsCachePath, JSON.stringify(failedCache, null, 2), 'utf-8');
|
|
1768
1769
|
let cachePath = node_path.resolve(root, CACHE_PATH, 'umd'), staticServer = node_http.createServer((req, res)=>{
|
|
1769
1770
|
if (res.setHeader('Access-Control-Allow-Origin', '*'), 'OPTIONS' === req.method) {
|
|
1770
1771
|
res.writeHead(204), res.end();
|
|
@@ -1880,7 +1881,7 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
1880
1881
|
req.headers.accept?.includes('html') && (req.url = '/index.html'), next();
|
|
1881
1882
|
}), middlewares.unshift(experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1882
1883
|
let server = new RspackDevServer(devServerOptions, compiler);
|
|
1883
|
-
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.
|
|
1884
|
+
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.7.0`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ${colors.dim('ms')}\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1884
1885
|
let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1885
1886
|
open && openBrowser(url), setupCliShortcuts({
|
|
1886
1887
|
openPage: async ()=>{
|
|
@@ -1953,7 +1954,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1953
1954
|
...mergeConfig(defaultConfig, config),
|
|
1954
1955
|
_context: {
|
|
1955
1956
|
callerName,
|
|
1956
|
-
version: "3.
|
|
1957
|
+
version: "3.7.0",
|
|
1957
1958
|
cachePath: 'node_modules/.unpack'
|
|
1958
1959
|
}
|
|
1959
1960
|
};
|
|
@@ -1962,12 +1963,16 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1962
1963
|
build: async ({ watch } = {})=>{
|
|
1963
1964
|
setNodeEnv(watch ? 'development' : 'production');
|
|
1964
1965
|
let config = resolveConfig();
|
|
1965
|
-
console.log(colors.brand(`${callerName} v3.
|
|
1966
|
+
console.log(colors.brand(`${callerName} v3.7.0`), colors.cyan(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
1966
1967
|
},
|
|
1967
1968
|
dev: async ()=>{
|
|
1968
1969
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|
|
1969
1970
|
let config = resolveConfig();
|
|
1970
1971
|
await unpackDev(config);
|
|
1972
|
+
},
|
|
1973
|
+
clean: ()=>{
|
|
1974
|
+
let config = resolveConfig(), relativeDir = config._context.cachePath, absDir = node_path.resolve(config.root, relativeDir);
|
|
1975
|
+
node_fs.existsSync(absDir) ? (removeDir(absDir), logger_logger.ready(`cache cleaned: ${colors.dim(relativeDir)}`)) : logger_logger.info(`cache not found, skipping clean: ${colors.dim(relativeDir)}`);
|
|
1971
1976
|
}
|
|
1972
1977
|
};
|
|
1973
1978
|
}
|
|
@@ -1985,6 +1990,6 @@ async function createChokidar(pathOrGlobs, root = process.cwd(), options) {
|
|
|
1985
1990
|
});
|
|
1986
1991
|
}
|
|
1987
1992
|
var __webpack_exports__CSS_NAMED_EXPORT = !1;
|
|
1988
|
-
import { fileURLToPath as
|
|
1989
|
-
import node_path, { dirname as
|
|
1993
|
+
import { fileURLToPath as __rspack_fileURLToPath, pathToFileURL } from "node:url";
|
|
1994
|
+
import node_path, { dirname as __rspack_dirname, join, sep } from "node:path";
|
|
1990
1995
|
export { CSS_MODULES_LOCAL_IDENT_NAME, CSS_MODULES_REGEX, DEFAULT_DEV_HOST, DEV_DEFAULT_FILENAME, EXPORT_LOCALS_CONVENTION, logger_LogColor as LogColor, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, TEMPLATE_CONTENT, THREAD_OPTIONS, addRestartCleaner, cleanUpBeforeRestart, clearLine, colors, convertBasicAnsiColors, createChokidar, createUnpack, currentDevUnpackConfig, debounce, defineConfig, esVersionToBrowserslist, findExists, getAddressUrls, getCompiledPkgPath, getIpv4Interfaces, getNodeEnv, getPathInJs, getPort, getTime, getUserDepPath, getUserDepVersion, getValueByPath, isBoolean, utils_isCI as isCI, isCSSModules, isDebug, isDev, utils_isDevServer as isDevServer, isEmptyDir, isFileExists, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isProd, isRegExp, isString, isUndefined, isWatch, isWin, launchEditor, loadConfig, logUpdate, logger_logger as logger, mergeConfig, pLimit, pathExists, pathToExportIdentifier, prettyTime, removeDir, resolveConfigPath, rspack, setCurrentDevUnpackConfig, setDevServer, setNodeEnv, setValueByPath, setupCliShortcuts, trackPerformance, __webpack_exports__CSS_NAMED_EXPORT as CSS_NAMED_EXPORT };
|
|
@@ -6,10 +6,10 @@ import "node:os";
|
|
|
6
6
|
import "node:path";
|
|
7
7
|
import "portfinder";
|
|
8
8
|
var __webpack_modules__ = {
|
|
9
|
-
"compiled/launch-editor"
|
|
9
|
+
"compiled/launch-editor" (module) {
|
|
10
10
|
module.exports = __rspack_external__compiled_launch_editor_index_js_29002383;
|
|
11
11
|
},
|
|
12
|
-
"compiled/webpack-merge"
|
|
12
|
+
"compiled/webpack-merge" (module) {
|
|
13
13
|
module.exports = __rspack_external__compiled_webpack_merge_index_js_efd91626;
|
|
14
14
|
}
|
|
15
15
|
}, __webpack_module_cache__ = {};
|
|
@@ -66,19 +66,15 @@ hexColor(COLOR_HEX.brand), hexColor(COLOR_HEX.red), hexColor(COLOR_HEX.green), h
|
|
|
66
66
|
code,
|
|
67
67
|
COLOR_HEX_TO_OPEN[hex]
|
|
68
68
|
]));
|
|
69
|
-
let { merge } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"),
|
|
69
|
+
let { merge: mergeConfig } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), escapeRegExp = (string)=>string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
70
70
|
function transformDeepImportLoader(content) {
|
|
71
71
|
if (this.cacheable && this.cacheable(!0), !content.includes('import')) return content;
|
|
72
72
|
let packages = this.getOptions().packages || [];
|
|
73
73
|
if (0 === packages.length || !packages.some((pkg)=>content.includes(pkg))) return content;
|
|
74
|
-
let
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
].sort((a, b)=>b.length - a.length).map(escapeRegExp).join('|');
|
|
79
|
-
cachedRegex = RegExp(`import\\s+([a-zA-Z0-9_$]+)\\s+from\\s+['"]((${packagesPattern})/[^'"]+)['"]`, 'g'), cachedKey = currentKey;
|
|
80
|
-
}
|
|
81
|
-
return content.replace(cachedRegex, (_, localName, importPath, pkgName)=>{
|
|
74
|
+
let packagesPattern = [
|
|
75
|
+
...packages
|
|
76
|
+
].sort((a, b)=>b.length - a.length).map(escapeRegExp).join('|'), regex = RegExp(`import\\s+([a-zA-Z0-9_$]+)\\s+from\\s+['"]((${packagesPattern})/[^'"]+)['"]`, 'g');
|
|
77
|
+
return content.replace(regex, (_, localName, importPath, pkgName)=>{
|
|
82
78
|
let name, exportName = ((!(name = (name = importPath.slice(pkgName.length + 1).replace(/[^a-zA-Z0-9_$]+([a-zA-Z0-9_$])/g, (_, char)=>char.toUpperCase()).replace(/[^a-zA-Z0-9_$]/g, '')).charAt(0).toUpperCase() + name.slice(1)) || /^[^a-zA-Z_$]/.test(name)) && (name = `_${name}`), name);
|
|
83
79
|
return `import { ${exportName} as ${localName} } from '${pkgName}'`;
|
|
84
80
|
});
|
|
@@ -6,10 +6,10 @@ import "node:net";
|
|
|
6
6
|
import "node:os";
|
|
7
7
|
import "portfinder";
|
|
8
8
|
var __webpack_modules__ = {
|
|
9
|
-
"compiled/launch-editor"
|
|
9
|
+
"compiled/launch-editor" (module) {
|
|
10
10
|
module.exports = __rspack_external__compiled_launch_editor_index_js_29002383;
|
|
11
11
|
},
|
|
12
|
-
"compiled/webpack-merge"
|
|
12
|
+
"compiled/webpack-merge" (module) {
|
|
13
13
|
module.exports = __rspack_external__compiled_webpack_merge_index_js_efd91626;
|
|
14
14
|
}
|
|
15
15
|
}, __webpack_module_cache__ = {};
|
|
@@ -66,7 +66,7 @@ hexColor(COLOR_HEX.brand), hexColor(COLOR_HEX.red), hexColor(COLOR_HEX.green), h
|
|
|
66
66
|
code,
|
|
67
67
|
COLOR_HEX_TO_OPEN[hex]
|
|
68
68
|
]));
|
|
69
|
-
let { merge } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), enforceLFLineSeparators = (text)=>text ? text.replace(/\r\n/g, '\n') : text;
|
|
69
|
+
let { merge: mergeConfig } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), enforceLFLineSeparators = (text)=>text ? text.replace(/\r\n/g, '\n') : text;
|
|
70
70
|
function typedCssModulesLoader(content, ...rest) {
|
|
71
71
|
var keys;
|
|
72
72
|
let interfaceFields, bannerMessage, callback, dirName, baseName, filename, { failed, success } = (callback = this.async(), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformDeepImportLoader.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/loaders/transformDeepImportLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"transformDeepImportLoader.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/loaders/transformDeepImportLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAOvC,MAAM,CAAC,OAAO,WACZ,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,EAClD,OAAO,EAAE,MAAM,GACd,MAAM,CAmCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUnpack.d.ts","sourceRoot":"","sources":["../src/createUnpack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createUnpack.d.ts","sourceRoot":"","sources":["../src/createUnpack.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,wBAAgB,YAAY,CAAC,EAC3B,GAAmB,EACnB,MAAM,EACN,UAAqB,GACtB,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;wBA+C4B;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;;;EA4B/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebundleDeps.d.ts","sourceRoot":"","sources":["../src/prebundleDeps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prebundleDeps.d.ts","sourceRoot":"","sources":["../src/prebundleDeps.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAiHnD,eAAO,MAAM,aAAa,GAAU,mBAEjC;IACD,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,OAAO,CAAC,YAAY,CA2VvB,CAAA"}
|
package/dist-types/utils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
2
|
import type { CompiledPkgName, NodeEnv, Target, UnpackConfig } from './types';
|
|
3
|
+
export declare const mergeConfig: any;
|
|
3
4
|
export declare const launchEditor: any;
|
|
4
5
|
export declare const getNodeEnv: () => NodeEnv;
|
|
5
6
|
export declare const setNodeEnv: (env: NodeEnv) => void;
|
|
@@ -40,7 +41,6 @@ export declare const trackPerformance: (msg?: string) => void;
|
|
|
40
41
|
* C:\Users\Desktop\project\src\index.js -> C:\\Users\\Desktop\\project\\src\\index.js
|
|
41
42
|
*/
|
|
42
43
|
export declare const getPathInJs: (absPath: string) => string;
|
|
43
|
-
export declare const mergeConfig: any;
|
|
44
44
|
export declare const getUserDepVersion: (root: string, dep: string) => any;
|
|
45
45
|
export declare const clearLine: () => void;
|
|
46
46
|
export declare const logUpdate: (output: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,SAAS,CAAA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
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "An Rspack-based build tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@rsdoctor/rspack-plugin": "1.3.12",
|
|
40
|
-
"@rspack/core": "1.6.
|
|
40
|
+
"@rspack/core": "1.6.7",
|
|
41
41
|
"@rspack/dev-server": "1.1.4",
|
|
42
42
|
"@types/less": "3.0.8",
|
|
43
43
|
"chokidar": "5.0.0",
|
|
44
44
|
"dotenv-expand": "12.0.3",
|
|
45
45
|
"jiti": "2.6.1",
|
|
46
|
-
"oxc-minify": "0.
|
|
46
|
+
"oxc-minify": "0.102.0",
|
|
47
47
|
"portfinder": "1.0.38",
|
|
48
48
|
"postcss": "8.5.6",
|
|
49
49
|
"thread-loader": "4.0.4",
|