@unpackjs/core 3.3.5 → 3.3.7
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 +8 -8
- package/compiled/sass-loader/index.js +8 -8
- package/dist/index.cjs +65 -92
- package/dist/index.js +57 -49
- package/dist-types/bundler-config/detectCircular.d.ts +6 -0
- package/dist-types/bundler-config/detectCircular.d.ts.map +1 -0
- package/dist-types/bundler-config/index.d.ts.map +1 -1
- package/dist-types/bundler-config/plugins/progress/helpers.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
2340: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(3674);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(1947).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
3674: (__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__(5824));
|
|
18
|
+
var _plugins = __nccwpck_require__(1513);
|
|
19
|
+
var _utils = __nccwpck_require__(1947);
|
|
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
|
+
1513: (__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__(5490),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(4475),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(3470));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
4475: (__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__(1947);
|
|
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
|
+
5490: (__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__(1947);
|
|
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
|
+
3470: (__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__(1947);
|
|
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
|
+
1947: (__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
|
+
5824: (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__(2340);
|
|
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
|
+
368: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(174)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
174: (__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__(996));
|
|
13
|
+
var _utils = __nccwpck_require__(159);
|
|
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
|
+
159: (__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
|
+
996: (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__(368);
|
|
344
344
|
module.exports = __webpack_exports__;
|
|
345
345
|
})();
|
|
@@ -5319,19 +5319,19 @@
|
|
|
5319
5319
|
module.exports = createColors();
|
|
5320
5320
|
module.exports.createColors = createColors;
|
|
5321
5321
|
},
|
|
5322
|
-
|
|
5322
|
+
4103: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5323
5323
|
"use strict";
|
|
5324
|
-
module.exports = __nccwpck_require__(
|
|
5324
|
+
module.exports = __nccwpck_require__(393)["default"];
|
|
5325
5325
|
},
|
|
5326
|
-
|
|
5326
|
+
393: (__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__(2657));
|
|
5334
|
+
var _utils = __nccwpck_require__(6660);
|
|
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
|
+
6660: (module, exports, __nccwpck_require__) => {
|
|
5513
5513
|
"use strict";
|
|
5514
5514
|
module = __nccwpck_require__.nmd(module);
|
|
5515
5515
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6620,7 +6620,7 @@
|
|
|
6620
6620
|
return keywords.has(word);
|
|
6621
6621
|
}
|
|
6622
6622
|
},
|
|
6623
|
-
|
|
6623
|
+
2657: (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__(4103);
|
|
6734
6734
|
module.exports = __webpack_exports__;
|
|
6735
6735
|
})();
|
|
@@ -4795,19 +4795,19 @@
|
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
4798
|
-
|
|
4798
|
+
944: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4799
4799
|
"use strict";
|
|
4800
|
-
const loader = __nccwpck_require__(
|
|
4800
|
+
const loader = __nccwpck_require__(614);
|
|
4801
4801
|
module.exports = loader.default;
|
|
4802
4802
|
},
|
|
4803
|
-
|
|
4803
|
+
614: (__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__(64));
|
|
4810
|
+
var _utils = __nccwpck_require__(215);
|
|
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
|
+
215: (__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
|
+
64: (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__(944);
|
|
5602
5602
|
module.exports = __webpack_exports__;
|
|
5603
5603
|
})();
|
package/dist/index.cjs
CHANGED
|
@@ -6,41 +6,6 @@ var __webpack_modules__ = {
|
|
|
6
6
|
},
|
|
7
7
|
"compiled/webpack-merge": function(module) {
|
|
8
8
|
module.exports = require("../compiled/webpack-merge/index.js");
|
|
9
|
-
},
|
|
10
|
-
"compiled/webpack-bundle-analyzer": function(module) {
|
|
11
|
-
module.exports = import("../compiled/webpack-bundle-analyzer/index.js").then(function(module) {
|
|
12
|
-
return module;
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
cors: function(module) {
|
|
16
|
-
module.exports = import("cors").then(function(module) {
|
|
17
|
-
return module;
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
express: function(module) {
|
|
21
|
-
module.exports = import("express").then(function(module) {
|
|
22
|
-
return module;
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
jiti: function(module) {
|
|
26
|
-
module.exports = import("jiti").then(function(module) {
|
|
27
|
-
return module;
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
"node:readline": function(module) {
|
|
31
|
-
module.exports = import("node:readline").then(function(module) {
|
|
32
|
-
return module;
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
"oxc-minify": function(module) {
|
|
36
|
-
module.exports = import("oxc-minify").then(function(module) {
|
|
37
|
-
return module;
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
"ts-checker-rspack-plugin": function(module) {
|
|
41
|
-
module.exports = import("ts-checker-rspack-plugin").then(function(module) {
|
|
42
|
-
return module;
|
|
43
|
-
});
|
|
44
9
|
}
|
|
45
10
|
}, __webpack_module_cache__ = {};
|
|
46
11
|
function __webpack_require__(moduleId) {
|
|
@@ -415,7 +380,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
415
380
|
}
|
|
416
381
|
].filter(Boolean), colorPrefix = colors.green(colors.dim('➜'));
|
|
417
382
|
help && console.log(!0 === help ? ` ${colorPrefix} ${colors.dim('press')} ${colors.bold('h + enter')} ${colors.dim('to show help')}` : ` ${colorPrefix} ${help}`);
|
|
418
|
-
let { createInterface } = await
|
|
383
|
+
let { createInterface } = await import("node:readline"), rl = createInterface({
|
|
419
384
|
input: process.stdin
|
|
420
385
|
});
|
|
421
386
|
rl.on('line', (input)=>{
|
|
@@ -446,7 +411,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
446
411
|
} else {
|
|
447
412
|
logger_logger.debug('loading config file with jiti:', colors.dim(configFilePath));
|
|
448
413
|
try {
|
|
449
|
-
let { createJiti } = await
|
|
414
|
+
let { createJiti } = await import("jiti"), jiti = createJiti(__filename, {
|
|
450
415
|
moduleCache: !1,
|
|
451
416
|
interopDefault: !0,
|
|
452
417
|
nativeModules: [
|
|
@@ -543,7 +508,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
543
508
|
}), Array.from(pluginMap.values());
|
|
544
509
|
}
|
|
545
510
|
async function applyBundleAnalyzeConfig({ config }) {
|
|
546
|
-
let { default: { BundleAnalyzerPlugin } } = await
|
|
511
|
+
let { default: { BundleAnalyzerPlugin } } = await import("../compiled/webpack-bundle-analyzer/index.js");
|
|
547
512
|
return config.plugins?.push(new BundleAnalyzerPlugin({
|
|
548
513
|
analyzerPort: 'auto'
|
|
549
514
|
})), config;
|
|
@@ -758,7 +723,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
758
723
|
apply(compiler) {
|
|
759
724
|
let meta = JSON.stringify({
|
|
760
725
|
name: jsMinify_PLUGIN_NAME,
|
|
761
|
-
version: "3.3.
|
|
726
|
+
version: "3.3.7",
|
|
762
727
|
options: this.minifyOptions
|
|
763
728
|
});
|
|
764
729
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -771,7 +736,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
771
736
|
});
|
|
772
737
|
}
|
|
773
738
|
async transformAssets(compilation) {
|
|
774
|
-
let { options: { devtool } } = compilation.compiler, sourceMap = 'string' == typeof devtool && devtool.includes('source-map'), assets = compilation.getAssets().filter((asset)=>!asset.info.minimized && isJsFile.test(asset.name)), minifyFn = this.customMinify ?? (await
|
|
739
|
+
let { options: { devtool } } = compilation.compiler, sourceMap = 'string' == typeof devtool && devtool.includes('source-map'), assets = compilation.getAssets().filter((asset)=>!asset.info.minimized && isJsFile.test(asset.name)), minifyFn = this.customMinify ?? (await import("oxc-minify")).minify;
|
|
775
740
|
assets.forEach((asset)=>{
|
|
776
741
|
let { source, map } = asset.source.sourceAndMap(), { name } = asset, output = minifyFn(name, Buffer.isBuffer(source) ? source.toString() : source, {
|
|
777
742
|
sourcemap: sourceMap,
|
|
@@ -979,16 +944,16 @@ for(var __webpack_i__ in (()=>{
|
|
|
979
944
|
}).join(', ');
|
|
980
945
|
return files.length > 1 ? `${fileInfo} and ${files.length - 1} more` : fileInfo;
|
|
981
946
|
}
|
|
982
|
-
let
|
|
983
|
-
async function compileDone(compiler, stats) {
|
|
984
|
-
let compileTime = stats.toJson({
|
|
947
|
+
let getCompileTime = (stats)=>stats.toJson({
|
|
985
948
|
preset: 'errors-only',
|
|
986
949
|
timings: !0
|
|
987
|
-
}).time / 1000,
|
|
950
|
+
}).time / 1000, sameCount = 0;
|
|
951
|
+
async function compileDone(compiler, stats) {
|
|
952
|
+
let root = compiler.options.context;
|
|
988
953
|
if (!stats.hasErrors()) if (isProd()) isCI() || await printFileSize({
|
|
989
954
|
root,
|
|
990
955
|
stats
|
|
991
|
-
}), logger_logger.ready(colors.green(`built in ${prettyTime(
|
|
956
|
+
}), logger_logger.ready(colors.green(`built in ${prettyTime(getCompileTime(stats))}`));
|
|
992
957
|
else {
|
|
993
958
|
let changedFiles = compiler.modifiedFiles ? Array.from(compiler.modifiedFiles) : null, fileInfo = function(changedFiles, removedFiles, root) {
|
|
994
959
|
if (!changedFiles?.length && !removedFiles?.length) return null;
|
|
@@ -1012,7 +977,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1012
977
|
logger_logger.debug(`${colors.cyan(packageName)}: ${colors.yellow(count)} modules`);
|
|
1013
978
|
});
|
|
1014
979
|
}
|
|
1015
|
-
isDebug() || logger_logger.clear(), console.log(colors.dim(getTime()), colors.cyan(colors.bold(`[${global.__unpack_caller_name}]`)), colors.green(utils_isDevServer() ? 'hmr update' : 'build'), `${colors.dim(fileInfo)}${sameCount > 1 ? ` ${colors.yellow(`(x${sameCount})`)}` : ''}`, isDebug() ? colors.dim(`| ${prettyTime(
|
|
980
|
+
isDebug() || logger_logger.clear(), console.log(colors.dim(getTime()), colors.cyan(colors.bold(`[${global.__unpack_caller_name}]`)), colors.green(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)`) : '');
|
|
1016
981
|
}
|
|
1017
982
|
}
|
|
1018
983
|
let progress_PLUGIN_NAME = 'ProgressPlugin';
|
|
@@ -1048,7 +1013,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1048
1013
|
}
|
|
1049
1014
|
}
|
|
1050
1015
|
async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
1051
|
-
let { TsCheckerRspackPlugin } = await
|
|
1016
|
+
let { TsCheckerRspackPlugin } = await import("ts-checker-rspack-plugin"), tsconfigPath = external_node_path_default().resolve(unpackConfig.root, 'tsconfig.json');
|
|
1052
1017
|
return config.plugins?.push(new TsCheckerRspackPlugin({
|
|
1053
1018
|
typescript: {
|
|
1054
1019
|
mode: 'readonly',
|
|
@@ -1077,7 +1042,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1077
1042
|
})), config;
|
|
1078
1043
|
}
|
|
1079
1044
|
async function getBundlerConfig(originalUnpackConfig) {
|
|
1080
|
-
let
|
|
1045
|
+
let { plugins, bundlerConfig, ...rest } = originalUnpackConfig;
|
|
1081
1046
|
for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
1082
1047
|
...originalUnpackConfig._context,
|
|
1083
1048
|
mergeConfig: mergeConfig
|
|
@@ -1214,44 +1179,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1214
1179
|
patterns: unpackConfig.build.copy
|
|
1215
1180
|
}),
|
|
1216
1181
|
new ProgressPlugin(),
|
|
1217
|
-
unpackConfig.lint && new OxlintPlugin()
|
|
1218
|
-
unpackConfig.detectCircular && (circularCount = 0, new core_namespaceObject.rspack.CircularDependencyRspackPlugin({
|
|
1219
|
-
exclude: /node_modules/,
|
|
1220
|
-
onStart () {
|
|
1221
|
-
circularCount = 0;
|
|
1222
|
-
},
|
|
1223
|
-
onDetected (_, modules) {
|
|
1224
|
-
var paths, paths1;
|
|
1225
|
-
circularCount++, console.log(''), logger_logger.warn('circular dependency detected:');
|
|
1226
|
-
let uniquePaths = modules.map((module)=>{
|
|
1227
|
-
let filePath = module.replace(/^.*!/, ''), relativePath = external_node_path_default().relative(unpackConfig.root, filePath);
|
|
1228
|
-
return relativePath.startsWith('..') ? filePath : relativePath;
|
|
1229
|
-
}).slice(0, -1), totalLength = 2 + uniquePaths.join(' → ').length;
|
|
1230
|
-
if (totalLength > (process.stdout.columns || 80)) {
|
|
1231
|
-
let arrow, lastIndex;
|
|
1232
|
-
paths = uniquePaths, console.log(''), arrow = '↳ ', lastIndex = paths.length - 1, paths.forEach((p, i)=>{
|
|
1233
|
-
switch(i){
|
|
1234
|
-
case 0:
|
|
1235
|
-
console.log(` ${p}`);
|
|
1236
|
-
break;
|
|
1237
|
-
case lastIndex:
|
|
1238
|
-
console.log(` ${arrow}${p} ${colors.dim('(cycle introduced)')}`);
|
|
1239
|
-
break;
|
|
1240
|
-
default:
|
|
1241
|
-
console.log(` ${arrow}${p}`);
|
|
1242
|
-
}
|
|
1243
|
-
}), console.log(` ${arrow}${paths[0]}`), console.log('');
|
|
1244
|
-
} else {
|
|
1245
|
-
let line1, upArrowPos, downArrowPos, lineLength;
|
|
1246
|
-
line1 = ' ', upArrowPos = 2, downArrowPos = 0, (paths1 = uniquePaths).forEach((p, i)=>{
|
|
1247
|
-
line1 += p, i < paths1.length - 1 ? line1 += ' → ' : downArrowPos = line1.length - 1;
|
|
1248
|
-
}), lineLength = downArrowPos - upArrowPos, console.log(''), console.log(line1), console.log(' ' + ' '.repeat(upArrowPos - 2) + '↑' + ' '.repeat(downArrowPos - upArrowPos - 1) + '↓'), console.log(' ' + ' '.repeat(upArrowPos - 2) + '└' + '─'.repeat(lineLength - 1) + '┘'), console.log('');
|
|
1249
|
-
}
|
|
1250
|
-
},
|
|
1251
|
-
onEnd () {
|
|
1252
|
-
circularCount > 0 && console.log(`Found ${circularCount} circular ${1 === circularCount ? 'dependency' : 'dependencies'}.`);
|
|
1253
|
-
}
|
|
1254
|
-
}))
|
|
1182
|
+
unpackConfig.lint && new OxlintPlugin()
|
|
1255
1183
|
].filter(Boolean),
|
|
1256
1184
|
externals: unpackConfig.externals,
|
|
1257
1185
|
resolve: {
|
|
@@ -1306,7 +1234,10 @@ for(var __webpack_i__ in (()=>{
|
|
|
1306
1234
|
]
|
|
1307
1235
|
},
|
|
1308
1236
|
watchOptions: {
|
|
1309
|
-
|
|
1237
|
+
aggregateTimeout: 0
|
|
1238
|
+
},
|
|
1239
|
+
performance: {
|
|
1240
|
+
hints: !1
|
|
1310
1241
|
}
|
|
1311
1242
|
};
|
|
1312
1243
|
for (let plugin of (config = (({ config, unpackConfig })=>{
|
|
@@ -1593,6 +1524,48 @@ for(var __webpack_i__ in (()=>{
|
|
|
1593
1524
|
})), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
|
|
1594
1525
|
config,
|
|
1595
1526
|
unpackConfig
|
|
1527
|
+
})), unpackConfig.detectCircular && (config = function({ config, unpackConfig }) {
|
|
1528
|
+
let circularCount = 0, circularDependencyPlugin = new core_namespaceObject.rspack.CircularDependencyRspackPlugin({
|
|
1529
|
+
exclude: /node_modules/,
|
|
1530
|
+
onStart () {
|
|
1531
|
+
circularCount = 0;
|
|
1532
|
+
},
|
|
1533
|
+
onDetected (_, modules) {
|
|
1534
|
+
var paths, paths1;
|
|
1535
|
+
circularCount++, console.log(''), logger_logger.warn('circular dependency detected:');
|
|
1536
|
+
let uniquePaths = modules.map((module)=>{
|
|
1537
|
+
let filePath = module.replace(/^.*!/, ''), relativePath = external_node_path_default().relative(unpackConfig.root, filePath);
|
|
1538
|
+
return relativePath.startsWith('..') ? filePath : relativePath;
|
|
1539
|
+
}).slice(0, -1), totalLength = 2 + uniquePaths.join(' → ').length;
|
|
1540
|
+
if (totalLength > (process.stdout.columns || 80)) {
|
|
1541
|
+
let arrow, lastIndex;
|
|
1542
|
+
paths = uniquePaths, console.log(''), arrow = '↳ ', lastIndex = paths.length - 1, paths.forEach((p, i)=>{
|
|
1543
|
+
switch(i){
|
|
1544
|
+
case 0:
|
|
1545
|
+
console.log(` ${p}`);
|
|
1546
|
+
break;
|
|
1547
|
+
case lastIndex:
|
|
1548
|
+
console.log(` ${arrow}${p} ${colors.dim('(cycle introduced)')}`);
|
|
1549
|
+
break;
|
|
1550
|
+
default:
|
|
1551
|
+
console.log(` ${arrow}${p}`);
|
|
1552
|
+
}
|
|
1553
|
+
}), console.log(` ${arrow}${paths[0]}`), console.log('');
|
|
1554
|
+
} else {
|
|
1555
|
+
let line1, upArrowPos, downArrowPos, lineLength;
|
|
1556
|
+
line1 = ' ', upArrowPos = 2, downArrowPos = 0, (paths1 = uniquePaths).forEach((p, i)=>{
|
|
1557
|
+
line1 += p, i < paths1.length - 1 ? line1 += ' → ' : downArrowPos = line1.length - 1;
|
|
1558
|
+
}), lineLength = downArrowPos - upArrowPos, console.log(''), console.log(line1), console.log(' ' + ' '.repeat(upArrowPos - 2) + '↑' + ' '.repeat(downArrowPos - upArrowPos - 1) + '↓'), console.log(' ' + ' '.repeat(upArrowPos - 2) + '└' + '─'.repeat(lineLength - 1) + '┘'), console.log('');
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
onEnd () {
|
|
1562
|
+
circularCount > 0 && console.log(`Found ${circularCount} circular ${1 === circularCount ? 'dependency' : 'dependencies'}`);
|
|
1563
|
+
}
|
|
1564
|
+
});
|
|
1565
|
+
return config.plugins?.push(circularDependencyPlugin), config;
|
|
1566
|
+
}({
|
|
1567
|
+
config,
|
|
1568
|
+
unpackConfig
|
|
1596
1569
|
})), getNormalizedPluginsByHook('bundlerConfig', unpackConfig.plugins)))config = await plugin.bundlerConfig(config, {
|
|
1597
1570
|
...unpackConfig._context,
|
|
1598
1571
|
unpackConfig,
|
|
@@ -1848,8 +1821,8 @@ for(var __webpack_i__ in (()=>{
|
|
|
1848
1821
|
recursive: !0
|
|
1849
1822
|
}), external_node_fs_default().writeFileSync(failedDepsCachePath1, JSON.stringify(cache, null, 2), 'utf-8'), failedDeps[0] && logger_logger.warn(`something went wrong while optimizing "${colors.bold(failedDeps.join(', '))}"`);
|
|
1850
1823
|
let cachePath = external_node_path_default().resolve(root, TEMP_DIR, 'umd'), [{ default: express }, { default: cors }] = await Promise.all([
|
|
1851
|
-
|
|
1852
|
-
|
|
1824
|
+
import("express"),
|
|
1825
|
+
import("cors")
|
|
1853
1826
|
]), app = express();
|
|
1854
1827
|
app.use(cors()), app.use("/umd", express.static(cachePath));
|
|
1855
1828
|
let port = await getPort(), staticServer = app.listen(port, ()=>{});
|
|
@@ -1935,7 +1908,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1935
1908
|
req.headers.accept?.includes('html') && (req.url = '/index.html'), next();
|
|
1936
1909
|
}), middlewares.unshift(core_namespaceObject.experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1937
1910
|
let server = new dev_server_namespaceObject.RspackDevServer(devServerOptions, compiler);
|
|
1938
|
-
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.
|
|
1911
|
+
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.7`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ms\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1939
1912
|
let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1940
1913
|
open && openBrowser(url), setupCliShortcuts({
|
|
1941
1914
|
openPage: async ()=>{
|
|
@@ -2008,7 +1981,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2008
1981
|
...mergeConfig(defaultConfig, config),
|
|
2009
1982
|
_context: {
|
|
2010
1983
|
callerName,
|
|
2011
|
-
version: "3.3.
|
|
1984
|
+
version: "3.3.7"
|
|
2012
1985
|
}
|
|
2013
1986
|
};
|
|
2014
1987
|
};
|
|
@@ -2016,7 +1989,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2016
1989
|
build: async ({ watch } = {})=>{
|
|
2017
1990
|
setNodeEnv(watch ? 'development' : 'production');
|
|
2018
1991
|
let config = resolveConfig();
|
|
2019
|
-
console.log(colors.rainbow(`${callerName} v3.3.
|
|
1992
|
+
console.log(colors.rainbow(`${callerName} v3.3.7`), colors.green(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
2020
1993
|
},
|
|
2021
1994
|
dev: async ()=>{
|
|
2022
1995
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|
package/dist/index.js
CHANGED
|
@@ -639,7 +639,7 @@ class JsMinifyPlugin {
|
|
|
639
639
|
apply(compiler) {
|
|
640
640
|
let meta = JSON.stringify({
|
|
641
641
|
name: jsMinify_PLUGIN_NAME,
|
|
642
|
-
version: "3.3.
|
|
642
|
+
version: "3.3.7",
|
|
643
643
|
options: this.minifyOptions
|
|
644
644
|
});
|
|
645
645
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -857,16 +857,16 @@ function formatFileList(paths, rootPath) {
|
|
|
857
857
|
}).join(', ');
|
|
858
858
|
return files.length > 1 ? `${fileInfo} and ${files.length - 1} more` : fileInfo;
|
|
859
859
|
}
|
|
860
|
-
let
|
|
861
|
-
async function compileDone(compiler, stats) {
|
|
862
|
-
let compileTime = stats.toJson({
|
|
860
|
+
let getCompileTime = (stats)=>stats.toJson({
|
|
863
861
|
preset: 'errors-only',
|
|
864
862
|
timings: !0
|
|
865
|
-
}).time / 1000,
|
|
863
|
+
}).time / 1000, sameCount = 0;
|
|
864
|
+
async function compileDone(compiler, stats) {
|
|
865
|
+
let root = compiler.options.context;
|
|
866
866
|
if (!stats.hasErrors()) if (isProd()) isCI() || await printFileSize({
|
|
867
867
|
root,
|
|
868
868
|
stats
|
|
869
|
-
}), logger_logger.ready(colors.green(`built in ${prettyTime(
|
|
869
|
+
}), logger_logger.ready(colors.green(`built in ${prettyTime(getCompileTime(stats))}`));
|
|
870
870
|
else {
|
|
871
871
|
let fileInfo = function(changedFiles, removedFiles, root) {
|
|
872
872
|
if (!changedFiles?.length && !removedFiles?.length) return null;
|
|
@@ -890,7 +890,7 @@ async function compileDone(compiler, stats) {
|
|
|
890
890
|
logger_logger.debug(`${colors.cyan(packageName)}: ${colors.yellow(count)} modules`);
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
|
-
isDebug() || logger_logger.clear(), console.log(colors.dim(getTime()), colors.cyan(colors.bold(`[${global.__unpack_caller_name}]`)), colors.green(utils_isDevServer() ? 'hmr update' : 'build'), `${colors.dim(fileInfo)}${sameCount > 1 ? ` ${colors.yellow(`(x${sameCount})`)}` : ''}`, isDebug() ? colors.dim(`| ${prettyTime(
|
|
893
|
+
isDebug() || logger_logger.clear(), console.log(colors.dim(getTime()), colors.cyan(colors.bold(`[${global.__unpack_caller_name}]`)), colors.green(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)`) : '');
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
let progress_PLUGIN_NAME = 'ProgressPlugin';
|
|
@@ -954,7 +954,7 @@ async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
|
954
954
|
})), config;
|
|
955
955
|
}
|
|
956
956
|
async function getBundlerConfig(originalUnpackConfig) {
|
|
957
|
-
let
|
|
957
|
+
let { plugins, bundlerConfig, ...rest } = originalUnpackConfig;
|
|
958
958
|
for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
959
959
|
...originalUnpackConfig._context,
|
|
960
960
|
mergeConfig: mergeConfig
|
|
@@ -1091,43 +1091,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1091
1091
|
patterns: unpackConfig.build.copy
|
|
1092
1092
|
}),
|
|
1093
1093
|
new ProgressPlugin(),
|
|
1094
|
-
unpackConfig.lint && new OxlintPlugin()
|
|
1095
|
-
unpackConfig.detectCircular && (circularCount = 0, new rspack.CircularDependencyRspackPlugin({
|
|
1096
|
-
exclude: /node_modules/,
|
|
1097
|
-
onStart () {
|
|
1098
|
-
circularCount = 0;
|
|
1099
|
-
},
|
|
1100
|
-
onDetected (_, modules) {
|
|
1101
|
-
circularCount++, console.log(''), logger_logger.warn('circular dependency detected:');
|
|
1102
|
-
let uniquePaths = modules.map((module)=>{
|
|
1103
|
-
let filePath = module.replace(/^.*!/, ''), relativePath = node_path.relative(unpackConfig.root, filePath);
|
|
1104
|
-
return relativePath.startsWith('..') ? filePath : relativePath;
|
|
1105
|
-
}).slice(0, -1);
|
|
1106
|
-
if (2 + uniquePaths.join(' → ').length > (process.stdout.columns || 80)) {
|
|
1107
|
-
let arrow, lastIndex;
|
|
1108
|
-
console.log(''), arrow = '↳ ', lastIndex = uniquePaths.length - 1, uniquePaths.forEach((p, i)=>{
|
|
1109
|
-
switch(i){
|
|
1110
|
-
case 0:
|
|
1111
|
-
console.log(` ${p}`);
|
|
1112
|
-
break;
|
|
1113
|
-
case lastIndex:
|
|
1114
|
-
console.log(` ${arrow}${p} ${colors.dim('(cycle introduced)')}`);
|
|
1115
|
-
break;
|
|
1116
|
-
default:
|
|
1117
|
-
console.log(` ${arrow}${p}`);
|
|
1118
|
-
}
|
|
1119
|
-
}), console.log(` ${arrow}${uniquePaths[0]}`), console.log('');
|
|
1120
|
-
} else {
|
|
1121
|
-
let line1, downArrowPos, lineLength;
|
|
1122
|
-
line1 = ' ', downArrowPos = 0, uniquePaths.forEach((p, i)=>{
|
|
1123
|
-
line1 += p, i < uniquePaths.length - 1 ? line1 += ' → ' : downArrowPos = line1.length - 1;
|
|
1124
|
-
}), lineLength = downArrowPos - 2, console.log(''), console.log(line1), console.log(' ' + ' '.repeat(0) + '↑' + ' '.repeat(downArrowPos - 2 - 1) + '↓'), console.log(' ' + ' '.repeat(0) + '└' + '─'.repeat(lineLength - 1) + '┘'), console.log('');
|
|
1125
|
-
}
|
|
1126
|
-
},
|
|
1127
|
-
onEnd () {
|
|
1128
|
-
circularCount > 0 && console.log(`Found ${circularCount} circular ${1 === circularCount ? 'dependency' : 'dependencies'}.`);
|
|
1129
|
-
}
|
|
1130
|
-
}))
|
|
1094
|
+
unpackConfig.lint && new OxlintPlugin()
|
|
1131
1095
|
].filter(Boolean),
|
|
1132
1096
|
externals: unpackConfig.externals,
|
|
1133
1097
|
resolve: {
|
|
@@ -1182,7 +1146,10 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1182
1146
|
]
|
|
1183
1147
|
},
|
|
1184
1148
|
watchOptions: {
|
|
1185
|
-
|
|
1149
|
+
aggregateTimeout: 0
|
|
1150
|
+
},
|
|
1151
|
+
performance: {
|
|
1152
|
+
hints: !1
|
|
1186
1153
|
}
|
|
1187
1154
|
};
|
|
1188
1155
|
for (let plugin of (config = (({ config, unpackConfig })=>{
|
|
@@ -1469,6 +1436,47 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1469
1436
|
})), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
|
|
1470
1437
|
config,
|
|
1471
1438
|
unpackConfig
|
|
1439
|
+
})), unpackConfig.detectCircular && (config = function({ config, unpackConfig }) {
|
|
1440
|
+
let circularCount = 0, circularDependencyPlugin = new rspack.CircularDependencyRspackPlugin({
|
|
1441
|
+
exclude: /node_modules/,
|
|
1442
|
+
onStart () {
|
|
1443
|
+
circularCount = 0;
|
|
1444
|
+
},
|
|
1445
|
+
onDetected (_, modules) {
|
|
1446
|
+
circularCount++, console.log(''), logger_logger.warn('circular dependency detected:');
|
|
1447
|
+
let uniquePaths = modules.map((module)=>{
|
|
1448
|
+
let filePath = module.replace(/^.*!/, ''), relativePath = node_path.relative(unpackConfig.root, filePath);
|
|
1449
|
+
return relativePath.startsWith('..') ? filePath : relativePath;
|
|
1450
|
+
}).slice(0, -1);
|
|
1451
|
+
if (2 + uniquePaths.join(' → ').length > (process.stdout.columns || 80)) {
|
|
1452
|
+
let arrow, lastIndex;
|
|
1453
|
+
console.log(''), arrow = '↳ ', lastIndex = uniquePaths.length - 1, uniquePaths.forEach((p, i)=>{
|
|
1454
|
+
switch(i){
|
|
1455
|
+
case 0:
|
|
1456
|
+
console.log(` ${p}`);
|
|
1457
|
+
break;
|
|
1458
|
+
case lastIndex:
|
|
1459
|
+
console.log(` ${arrow}${p} ${colors.dim('(cycle introduced)')}`);
|
|
1460
|
+
break;
|
|
1461
|
+
default:
|
|
1462
|
+
console.log(` ${arrow}${p}`);
|
|
1463
|
+
}
|
|
1464
|
+
}), console.log(` ${arrow}${uniquePaths[0]}`), console.log('');
|
|
1465
|
+
} else {
|
|
1466
|
+
let line1, downArrowPos, lineLength;
|
|
1467
|
+
line1 = ' ', downArrowPos = 0, uniquePaths.forEach((p, i)=>{
|
|
1468
|
+
line1 += p, i < uniquePaths.length - 1 ? line1 += ' → ' : downArrowPos = line1.length - 1;
|
|
1469
|
+
}), lineLength = downArrowPos - 2, console.log(''), console.log(line1), console.log(' ' + ' '.repeat(0) + '↑' + ' '.repeat(downArrowPos - 2 - 1) + '↓'), console.log(' ' + ' '.repeat(0) + '└' + '─'.repeat(lineLength - 1) + '┘'), console.log('');
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
onEnd () {
|
|
1473
|
+
circularCount > 0 && console.log(`Found ${circularCount} circular ${1 === circularCount ? 'dependency' : 'dependencies'}`);
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
return config.plugins?.push(circularDependencyPlugin), config;
|
|
1477
|
+
}({
|
|
1478
|
+
config,
|
|
1479
|
+
unpackConfig
|
|
1472
1480
|
})), getNormalizedPluginsByHook('bundlerConfig', unpackConfig.plugins)))config = await plugin.bundlerConfig(config, {
|
|
1473
1481
|
...unpackConfig._context,
|
|
1474
1482
|
unpackConfig,
|
|
@@ -1810,7 +1818,7 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
1810
1818
|
req.headers.accept?.includes('html') && (req.url = '/index.html'), next();
|
|
1811
1819
|
}), middlewares.unshift(experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1812
1820
|
let server = new RspackDevServer(devServerOptions, compiler);
|
|
1813
|
-
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.
|
|
1821
|
+
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.7`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ms\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1814
1822
|
let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1815
1823
|
open && openBrowser(url), setupCliShortcuts({
|
|
1816
1824
|
openPage: async ()=>{
|
|
@@ -1883,7 +1891,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1883
1891
|
...mergeConfig(defaultConfig, config),
|
|
1884
1892
|
_context: {
|
|
1885
1893
|
callerName,
|
|
1886
|
-
version: "3.3.
|
|
1894
|
+
version: "3.3.7"
|
|
1887
1895
|
}
|
|
1888
1896
|
};
|
|
1889
1897
|
};
|
|
@@ -1891,7 +1899,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1891
1899
|
build: async ({ watch } = {})=>{
|
|
1892
1900
|
setNodeEnv(watch ? 'development' : 'production');
|
|
1893
1901
|
let config = resolveConfig();
|
|
1894
|
-
console.log(colors.rainbow(`${callerName} v3.3.
|
|
1902
|
+
console.log(colors.rainbow(`${callerName} v3.3.7`), colors.green(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
1895
1903
|
},
|
|
1896
1904
|
dev: async ()=>{
|
|
1897
1905
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BundlerConfiguration, UnpackConfig } from '../types';
|
|
2
|
+
export declare function applyDetectCircularConfig({ config, unpackConfig, }: {
|
|
3
|
+
config: BundlerConfiguration;
|
|
4
|
+
unpackConfig: UnpackConfig;
|
|
5
|
+
}): BundlerConfiguration;
|
|
6
|
+
//# sourceMappingURL=detectCircular.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectCircular.d.ts","sourceRoot":"","sources":["../../src/bundler-config/detectCircular.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAEnE,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CAsHvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAuBnE,wBAAsB,gBAAgB,CACpC,oBAAoB,EAAE,YAAY,GACjC,OAAO,CAAC,oBAAoB,CAAC,CA0M/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/bundler-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/bundler-config/plugins/progress/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AA8HvC,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,iBAsC/E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpackjs/core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
4
4
|
"description": "An Rspack-based build tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"css-loader": "7.1.2",
|
|
32
32
|
"less-loader": "12.3.0",
|
|
33
33
|
"postcss-loader": "8.2.0",
|
|
34
|
-
"sass-embedded": "1.93.
|
|
34
|
+
"sass-embedded": "1.93.3",
|
|
35
35
|
"sass-loader": "16.0.6",
|
|
36
36
|
"semver": "7.7.3",
|
|
37
37
|
"style-loader": "4.0.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"launch-editor": "2.12.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@rspack/core": "1.6.
|
|
43
|
+
"@rspack/core": "1.6.1",
|
|
44
44
|
"@rspack/dev-server": "1.1.4",
|
|
45
45
|
"@types/less": "3.0.8",
|
|
46
46
|
"chokidar": "4.0.3",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"postcss": "8.5.6",
|
|
55
55
|
"thread-loader": "4.0.4",
|
|
56
56
|
"tinyglobby": "0.2.15",
|
|
57
|
-
"ts-checker-rspack-plugin": "1.
|
|
57
|
+
"ts-checker-rspack-plugin": "1.2.0",
|
|
58
58
|
"typed-css-modules": "0.9.1"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|