@unpackjs/core 3.3.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +79 -47
- package/dist/index.js +60 -54
- package/dist-types/bundler-config/bundleAnalyze.d.ts +5 -0
- package/dist-types/bundler-config/bundleAnalyze.d.ts.map +1 -0
- package/dist-types/bundler-config/index.d.ts.map +1 -1
- package/dist-types/bundler-config/typeCheck.d.ts +6 -0
- package/dist-types/bundler-config/typeCheck.d.ts.map +1 -0
- package/dist-types/config.d.ts.map +1 -1
- package/dist-types/prebundleDeps.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
3508: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(7418);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(3467).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
7418: (__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__(2935));
|
|
18
|
+
var _plugins = __nccwpck_require__(6665);
|
|
19
|
+
var _utils = __nccwpck_require__(3467);
|
|
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
|
+
6665: (__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__(2962),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(2923),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6782));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
2923: (__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__(9028);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(3467);
|
|
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
|
+
2962: (__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__(2948),
|
|
388
388
|
);
|
|
389
|
-
var _utils = __nccwpck_require__(
|
|
389
|
+
var _utils = __nccwpck_require__(3467);
|
|
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
|
+
6782: (__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__(2948),
|
|
700
700
|
);
|
|
701
|
-
var _utils = __nccwpck_require__(
|
|
701
|
+
var _utils = __nccwpck_require__(3467);
|
|
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
|
+
3467: (__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;
|
|
@@ -7964,7 +7964,7 @@
|
|
|
7964
7964
|
"use strict";
|
|
7965
7965
|
module.exports = require("util");
|
|
7966
7966
|
},
|
|
7967
|
-
|
|
7967
|
+
2935: (module) => {
|
|
7968
7968
|
"use strict";
|
|
7969
7969
|
module.exports = JSON.parse(
|
|
7970
7970
|
'{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
|
|
@@ -7999,6 +7999,6 @@
|
|
|
7999
7999
|
}
|
|
8000
8000
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8001
8001
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8002
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8002
|
+
var __webpack_exports__ = __nccwpck_require__(3508);
|
|
8003
8003
|
module.exports = __webpack_exports__;
|
|
8004
8004
|
})();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
946: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(816)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
816: (__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__(529));
|
|
13
|
+
var _utils = __nccwpck_require__(910);
|
|
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
|
+
910: (__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
|
+
529: (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__(946);
|
|
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
|
+
3505: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5323
5323
|
"use strict";
|
|
5324
|
-
module.exports = __nccwpck_require__(
|
|
5324
|
+
module.exports = __nccwpck_require__(4211)["default"];
|
|
5325
5325
|
},
|
|
5326
|
-
|
|
5326
|
+
4211: (__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__(4698));
|
|
5334
|
+
var _utils = __nccwpck_require__(8446);
|
|
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
|
+
8446: (module, exports, __nccwpck_require__) => {
|
|
5513
5513
|
"use strict";
|
|
5514
5514
|
module = __nccwpck_require__.nmd(module);
|
|
5515
5515
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6618,7 +6618,7 @@
|
|
|
6618
6618
|
return keywords.has(word);
|
|
6619
6619
|
}
|
|
6620
6620
|
},
|
|
6621
|
-
|
|
6621
|
+
4698: (module) => {
|
|
6622
6622
|
"use strict";
|
|
6623
6623
|
module.exports = JSON.parse(
|
|
6624
6624
|
'{"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}',
|
|
@@ -6728,6 +6728,6 @@
|
|
|
6728
6728
|
})();
|
|
6729
6729
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
6730
6730
|
__nccwpck_require__.ab = __dirname + "/";
|
|
6731
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
6731
|
+
var __webpack_exports__ = __nccwpck_require__(3505);
|
|
6732
6732
|
module.exports = __webpack_exports__;
|
|
6733
6733
|
})();
|
|
@@ -4795,19 +4795,19 @@
|
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
4798
|
-
|
|
4798
|
+
893: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4799
4799
|
"use strict";
|
|
4800
|
-
const loader = __nccwpck_require__(
|
|
4800
|
+
const loader = __nccwpck_require__(799);
|
|
4801
4801
|
module.exports = loader.default;
|
|
4802
4802
|
},
|
|
4803
|
-
|
|
4803
|
+
799: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4804
4804
|
"use strict";
|
|
4805
4805
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4806
4806
|
exports["default"] = void 0;
|
|
4807
4807
|
var _url = _interopRequireDefault(__nccwpck_require__(16));
|
|
4808
4808
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
4809
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
4810
|
-
var _utils = __nccwpck_require__(
|
|
4809
|
+
var _options = _interopRequireDefault(__nccwpck_require__(670));
|
|
4810
|
+
var _utils = __nccwpck_require__(570);
|
|
4811
4811
|
function _interopRequireDefault(e) {
|
|
4812
4812
|
return e && e.__esModule ? e : { default: e };
|
|
4813
4813
|
}
|
|
@@ -4917,7 +4917,7 @@
|
|
|
4917
4917
|
}
|
|
4918
4918
|
var _default = (exports["default"] = loader);
|
|
4919
4919
|
},
|
|
4920
|
-
|
|
4920
|
+
570: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4921
4921
|
"use strict";
|
|
4922
4922
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4923
4923
|
exports.errorFactory = errorFactory;
|
|
@@ -5582,7 +5582,7 @@
|
|
|
5582
5582
|
"use strict";
|
|
5583
5583
|
module.exports = require("url");
|
|
5584
5584
|
},
|
|
5585
|
-
|
|
5585
|
+
670: (module) => {
|
|
5586
5586
|
"use strict";
|
|
5587
5587
|
module.exports = JSON.parse(
|
|
5588
5588
|
'{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack-contrib/sass-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"api":{"description":"Switch between old and modern API for `sass` (`Dart Sass`) and `Sass Embedded` implementations.","link":"https://github.com/webpack-contrib/sass-loader#sassoptions","enum":["legacy","modern","modern-compiler"]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack-contrib/sass-loader#sassoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file.","link":"https://github.com/webpack-contrib/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack-contrib/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}',
|
|
@@ -5612,6 +5612,6 @@
|
|
|
5612
5612
|
}
|
|
5613
5613
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
5614
5614
|
__nccwpck_require__.ab = __dirname + "/";
|
|
5615
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
5615
|
+
var __webpack_exports__ = __nccwpck_require__(893);
|
|
5616
5616
|
module.exports = __webpack_exports__;
|
|
5617
5617
|
})();
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
"compiled/webpack-bundle-analyzer": function(module) {
|
|
5
|
-
module.exports = require("../compiled/webpack-bundle-analyzer/index.js");
|
|
6
|
-
},
|
|
7
4
|
"compiled/webpack-merge": function(module) {
|
|
8
5
|
module.exports = require("../compiled/webpack-merge/index.js");
|
|
9
6
|
},
|
|
7
|
+
"compiled/webpack-bundle-analyzer": function(module) {
|
|
8
|
+
module.exports = import("../compiled/webpack-bundle-analyzer/index.js").then(function(module) {
|
|
9
|
+
return module;
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
cors: function(module) {
|
|
13
|
+
module.exports = import("cors").then(function(module) {
|
|
14
|
+
return module;
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
express: function(module) {
|
|
18
|
+
module.exports = import("express").then(function(module) {
|
|
19
|
+
return module;
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
jiti: function(module) {
|
|
23
|
+
module.exports = import("jiti").then(function(module) {
|
|
24
|
+
return module;
|
|
25
|
+
});
|
|
26
|
+
},
|
|
10
27
|
"node:readline": function(module) {
|
|
11
28
|
module.exports = import("node:readline").then(function(module) {
|
|
12
29
|
return module;
|
|
@@ -16,6 +33,11 @@ var __webpack_modules__ = {
|
|
|
16
33
|
module.exports = import("oxc-minify").then(function(module) {
|
|
17
34
|
return module;
|
|
18
35
|
});
|
|
36
|
+
},
|
|
37
|
+
"ts-checker-rspack-plugin": function(module) {
|
|
38
|
+
module.exports = import("ts-checker-rspack-plugin").then(function(module) {
|
|
39
|
+
return module;
|
|
40
|
+
});
|
|
19
41
|
}
|
|
20
42
|
}, __webpack_module_cache__ = {};
|
|
21
43
|
function __webpack_require__(moduleId) {
|
|
@@ -404,7 +426,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
404
426
|
for (let shortcut of shortcuts)if (input === shortcut.key) return void shortcut.action();
|
|
405
427
|
}), addRestartCleaner(()=>rl.close());
|
|
406
428
|
}
|
|
407
|
-
let external_node_url_namespaceObject = require("node:url")
|
|
429
|
+
let external_node_url_namespaceObject = require("node:url");
|
|
408
430
|
async function loadConfig({ cliOptions, command }) {
|
|
409
431
|
'build' === command ? setNodeEnv((null == cliOptions ? void 0 : cliOptions.watch) ? 'development' : 'production') : (setNodeEnv('development'), setDevServer(!0));
|
|
410
432
|
let root = (null == cliOptions ? void 0 : cliOptions.root) ? external_node_path_default().resolve(cliOptions.root) : process.cwd(), configFilePath = resolveConfigPath(root, null == cliOptions ? void 0 : cliOptions.config), configExport = {};
|
|
@@ -420,7 +442,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
420
442
|
} else {
|
|
421
443
|
logger_logger.debug('loading config file with jiti:', colors.dim(configFilePath));
|
|
422
444
|
try {
|
|
423
|
-
let
|
|
445
|
+
let { createJiti } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "jiti")), jiti = createJiti(__filename, {
|
|
424
446
|
moduleCache: !1,
|
|
425
447
|
interopDefault: !0,
|
|
426
448
|
nativeModules: [
|
|
@@ -517,7 +539,13 @@ for(var __webpack_i__ in (()=>{
|
|
|
517
539
|
plugin[hook] && pluginMap.set(plugin.name, plugin);
|
|
518
540
|
}), Array.from(pluginMap.values());
|
|
519
541
|
}
|
|
520
|
-
|
|
542
|
+
async function applyBundleAnalyzeConfig({ config }) {
|
|
543
|
+
var _config_plugins;
|
|
544
|
+
let { default: { BundleAnalyzerPlugin } } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "compiled/webpack-bundle-analyzer"));
|
|
545
|
+
return null == (_config_plugins = config.plugins) || _config_plugins.push(new BundleAnalyzerPlugin({
|
|
546
|
+
analyzerPort: 'auto'
|
|
547
|
+
})), config;
|
|
548
|
+
}
|
|
521
549
|
async function getBuildDependencies(root, userBuildDependencies, envFilePaths) {
|
|
522
550
|
let rootPackageJson = external_node_path_default().join(root, 'package.json'), browserslistConfig = external_node_path_default().join(root, '.browserslistrc'), tsconfigPath = external_node_path_default().join(root, 'tsconfig.json'), buildDependencies = {};
|
|
523
551
|
await isFileExists(rootPackageJson) && (buildDependencies.packageJson = [
|
|
@@ -731,7 +759,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
731
759
|
apply(compiler) {
|
|
732
760
|
let meta = JSON.stringify({
|
|
733
761
|
name: jsMinify_PLUGIN_NAME,
|
|
734
|
-
version: "3.3.
|
|
762
|
+
version: "3.3.2",
|
|
735
763
|
options: this.minifyOptions
|
|
736
764
|
});
|
|
737
765
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -1021,9 +1049,37 @@ for(var __webpack_i__ in (()=>{
|
|
|
1021
1049
|
}(this, "progressBar", new ProgressBar());
|
|
1022
1050
|
}
|
|
1023
1051
|
}
|
|
1024
|
-
|
|
1052
|
+
async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
1053
|
+
var _config_plugins;
|
|
1054
|
+
let { TsCheckerRspackPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "ts-checker-rspack-plugin")), tsconfigPath = external_node_path_default().resolve(unpackConfig.root, 'tsconfig.json');
|
|
1055
|
+
return null == (_config_plugins = config.plugins) || _config_plugins.push(new TsCheckerRspackPlugin({
|
|
1056
|
+
typescript: {
|
|
1057
|
+
mode: 'readonly',
|
|
1058
|
+
memoryLimit: 8192,
|
|
1059
|
+
configFile: tsconfigPath,
|
|
1060
|
+
typescriptPath: require.resolve("typescript", {
|
|
1061
|
+
paths: [
|
|
1062
|
+
unpackConfig.root
|
|
1063
|
+
]
|
|
1064
|
+
})
|
|
1065
|
+
},
|
|
1066
|
+
issue: {
|
|
1067
|
+
exclude: [
|
|
1068
|
+
({ file = '' })=>NODE_MODULES_REGEX.test(file)
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
logger: {
|
|
1072
|
+
log (message) {
|
|
1073
|
+
message.includes('Found') && console.log(message.split(' in ')[0]);
|
|
1074
|
+
},
|
|
1075
|
+
error (message) {
|
|
1076
|
+
message.includes('RpcExitError') || message.includes('out of memory') || console.log(message.replace(/ERROR/g, 'Type Error'));
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
})), config;
|
|
1080
|
+
}
|
|
1025
1081
|
async function getBundlerConfig(originalUnpackConfig) {
|
|
1026
|
-
var _unpackConfig_build, _unpackConfig_build1, _unpackConfig_build2, _unpackConfig_build3, _unpackConfig_build4, _unpackConfig_build5, _unpackConfig_build6, _unpackConfig_html, _unpackConfig_html1, _unpackConfig_html2, _unpackConfig_html3, _unpackConfig_html4, _unpackConfig_html5, _unpackConfig_html6, _unpackConfig_html7, _unpackConfig_performance,
|
|
1082
|
+
var _unpackConfig_build, _unpackConfig_build1, _unpackConfig_build2, _unpackConfig_build3, _unpackConfig_build4, _unpackConfig_build5, _unpackConfig_build6, _unpackConfig_html, _unpackConfig_html1, _unpackConfig_html2, _unpackConfig_html3, _unpackConfig_html4, _unpackConfig_html5, _unpackConfig_html6, _unpackConfig_html7, _unpackConfig_performance, _unpackConfig_build7, _unpackConfig_resolve, _unpackConfig_resolve1, _unpackConfig_dev, _unpackConfig_build8, _unpackConfig_experiments, _unpackConfig_build9, _unpackConfig_dev1, _unpackConfig_performance1;
|
|
1027
1083
|
let circularCount, { plugins, bundlerConfig, ...rest } = originalUnpackConfig;
|
|
1028
1084
|
for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
1029
1085
|
...originalUnpackConfig._context,
|
|
@@ -1153,41 +1209,13 @@ for(var __webpack_i__ in (()=>{
|
|
|
1153
1209
|
'main'
|
|
1154
1210
|
]
|
|
1155
1211
|
}),
|
|
1156
|
-
(null == (_unpackConfig_performance = unpackConfig.performance) ? void 0 : _unpackConfig_performance.
|
|
1157
|
-
analyzerPort: 'auto'
|
|
1158
|
-
}),
|
|
1159
|
-
(null == (_unpackConfig_performance1 = unpackConfig.performance) ? void 0 : _unpackConfig_performance1.removeMomentLocale) && new core_namespaceObject.rspack.IgnorePlugin({
|
|
1212
|
+
(null == (_unpackConfig_performance = unpackConfig.performance) ? void 0 : _unpackConfig_performance.removeMomentLocale) && new core_namespaceObject.rspack.IgnorePlugin({
|
|
1160
1213
|
resourceRegExp: /^\.\/locale$/,
|
|
1161
1214
|
contextRegExp: /moment$/
|
|
1162
1215
|
}),
|
|
1163
1216
|
(null == (_unpackConfig_build7 = unpackConfig.build) ? void 0 : _unpackConfig_build7.copy) && new core_namespaceObject.rspack.CopyRspackPlugin({
|
|
1164
1217
|
patterns: unpackConfig.build.copy
|
|
1165
1218
|
}),
|
|
1166
|
-
unpackConfig.typeCheck && isDev() && isTs && new external_ts_checker_rspack_plugin_namespaceObject.TsCheckerRspackPlugin({
|
|
1167
|
-
typescript: {
|
|
1168
|
-
mode: 'readonly',
|
|
1169
|
-
memoryLimit: 8192,
|
|
1170
|
-
configFile: tsconfigPath,
|
|
1171
|
-
typescriptPath: require.resolve("typescript", {
|
|
1172
|
-
paths: [
|
|
1173
|
-
unpackConfig.root
|
|
1174
|
-
]
|
|
1175
|
-
})
|
|
1176
|
-
},
|
|
1177
|
-
issue: {
|
|
1178
|
-
exclude: [
|
|
1179
|
-
({ file = '' })=>NODE_MODULES_REGEX.test(file)
|
|
1180
|
-
]
|
|
1181
|
-
},
|
|
1182
|
-
logger: {
|
|
1183
|
-
log (message) {
|
|
1184
|
-
message.includes('Found') && console.log(message.split(' in ')[0]);
|
|
1185
|
-
},
|
|
1186
|
-
error (message) {
|
|
1187
|
-
message.includes('RpcExitError') || message.includes('out of memory') || console.log(message.replace(/ERROR/g, 'Type Error'));
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}),
|
|
1191
1219
|
new ProgressPlugin(),
|
|
1192
1220
|
unpackConfig.lint && new OxlintPlugin(),
|
|
1193
1221
|
unpackConfig.detectCircular && (circularCount = 0, new core_namespaceObject.rspack.CircularDependencyRspackPlugin({
|
|
@@ -1581,6 +1609,11 @@ for(var __webpack_i__ in (()=>{
|
|
|
1581
1609
|
config,
|
|
1582
1610
|
unpackConfig,
|
|
1583
1611
|
envFilePaths
|
|
1612
|
+
})), (null == (_unpackConfig_performance1 = unpackConfig.performance) ? void 0 : _unpackConfig_performance1.bundleAnalyze) && isProd() && (config = await applyBundleAnalyzeConfig({
|
|
1613
|
+
config
|
|
1614
|
+
})), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
|
|
1615
|
+
config,
|
|
1616
|
+
unpackConfig
|
|
1584
1617
|
})), getNormalizedPluginsByHook('bundlerConfig', unpackConfig.plugins)))config = await plugin.bundlerConfig(config, {
|
|
1585
1618
|
...unpackConfig._context,
|
|
1586
1619
|
unpackConfig,
|
|
@@ -1667,10 +1700,6 @@ for(var __webpack_i__ in (()=>{
|
|
|
1667
1700
|
});
|
|
1668
1701
|
});
|
|
1669
1702
|
}
|
|
1670
|
-
let external_cors_namespaceObject = require("cors");
|
|
1671
|
-
var external_cors_default = __webpack_require__.n(external_cors_namespaceObject);
|
|
1672
|
-
let external_express_namespaceObject = require("express");
|
|
1673
|
-
var external_express_default = __webpack_require__.n(external_express_namespaceObject);
|
|
1674
1703
|
let getExternalLibraryName = (pkgName)=>({
|
|
1675
1704
|
react: 'React',
|
|
1676
1705
|
'react-dom': 'ReactDOM',
|
|
@@ -1839,8 +1868,11 @@ for(var __webpack_i__ in (()=>{
|
|
|
1839
1868
|
failedDepsCachePath1 = failedDepsCachePath2, cache = failedCache, cacheDir = external_node_path_default().dirname(failedDepsCachePath1), external_node_fs_default().existsSync(cacheDir) || external_node_fs_default().mkdirSync(cacheDir, {
|
|
1840
1869
|
recursive: !0
|
|
1841
1870
|
}), 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(', '))}"`);
|
|
1842
|
-
let cachePath = external_node_path_default().resolve(root, TEMP_DIR, 'umd'),
|
|
1843
|
-
|
|
1871
|
+
let cachePath = external_node_path_default().resolve(root, TEMP_DIR, 'umd'), [{ default: express }, { default: cors }] = await Promise.all([
|
|
1872
|
+
Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "express")),
|
|
1873
|
+
Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "cors"))
|
|
1874
|
+
]), app = express();
|
|
1875
|
+
app.use(cors()), app.use("/umd", express.static(cachePath));
|
|
1844
1876
|
let port = await getPort(), staticServer = app.listen(port, ()=>{});
|
|
1845
1877
|
addRestartCleaner(()=>new Promise((resolve)=>staticServer.close(()=>resolve())));
|
|
1846
1878
|
let externals1 = {}, jsAssets = [], cssAssets = [], preJsAssets = [];
|
|
@@ -1927,7 +1959,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1927
1959
|
(null == (_req_headers_accept = req.headers.accept) ? void 0 : _req_headers_accept.includes('html')) && (req.url = '/index.html'), next();
|
|
1928
1960
|
}), middlewares.unshift(core_namespaceObject.experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1929
1961
|
let server = new dev_server_namespaceObject.RspackDevServer(devServerOptions, compiler);
|
|
1930
|
-
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.
|
|
1962
|
+
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.2`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ms\n`), printAddressUrls(port, null == (_unpackConfig_server2 = unpackConfig.server) ? void 0 : _unpackConfig_server2.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1931
1963
|
let open = null == (_unpackConfig_server3 = unpackConfig.server) ? void 0 : _unpackConfig_server3.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1932
1964
|
open && openBrowser(url), setupCliShortcuts({
|
|
1933
1965
|
openPage: async ()=>{
|
|
@@ -2001,7 +2033,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2001
2033
|
...mergeConfig(defaultConfig, config),
|
|
2002
2034
|
_context: {
|
|
2003
2035
|
callerName,
|
|
2004
|
-
version: "3.3.
|
|
2036
|
+
version: "3.3.2"
|
|
2005
2037
|
}
|
|
2006
2038
|
};
|
|
2007
2039
|
};
|
|
@@ -2009,7 +2041,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2009
2041
|
build: async ({ watch } = {})=>{
|
|
2010
2042
|
setNodeEnv(watch ? 'development' : 'production');
|
|
2011
2043
|
let config = resolveConfig();
|
|
2012
|
-
console.log(colors.rainbow(`${callerName} v3.3.
|
|
2044
|
+
console.log(colors.rainbow(`${callerName} v3.3.2`), colors.green(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
2013
2045
|
},
|
|
2014
2046
|
dev: async ()=>{
|
|
2015
2047
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import __rslib_shim_module__ from 'module';
|
|
|
3
3
|
let require = __rslib_shim_module__.createRequire(import.meta.url);
|
|
4
4
|
import { fileURLToPath as __webpack_fileURLToPath__ } from "node:url";
|
|
5
5
|
import { dirname as __webpack_dirname__ } from "node:path";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE__compiled_webpack_bundle_analyzer_index_js_1177eada__ from "../compiled/webpack-bundle-analyzer/index.js";
|
|
7
6
|
import * as __WEBPACK_EXTERNAL_MODULE__compiled_webpack_merge_index_js_efd91626__ from "../compiled/webpack-merge/index.js";
|
|
8
7
|
import { experiments, rspack } from "@rspack/core";
|
|
9
8
|
import picocolors from "picocolors";
|
|
@@ -14,9 +13,7 @@ import node_os, { platform } from "node:os";
|
|
|
14
13
|
import node_path, { join, sep } from "node:path";
|
|
15
14
|
import portfinder from "portfinder";
|
|
16
15
|
import { pathToFileURL } from "node:url";
|
|
17
|
-
import { createJiti } from "jiti";
|
|
18
16
|
import { expand } from "dotenv-expand";
|
|
19
|
-
import { TsCheckerRspackPlugin } from "ts-checker-rspack-plugin";
|
|
20
17
|
import node_assert from "node:assert";
|
|
21
18
|
import { glob, globSync } from "tinyglobby";
|
|
22
19
|
import typed_css_modules from "typed-css-modules";
|
|
@@ -24,25 +21,12 @@ import { exec, spawn } from "node:child_process";
|
|
|
24
21
|
import { promisify } from "node:util";
|
|
25
22
|
import node_zlib from "node:zlib";
|
|
26
23
|
import { RspackDevServer } from "@rspack/dev-server";
|
|
27
|
-
import cors from "cors";
|
|
28
|
-
import express from "express";
|
|
29
24
|
import chokidar from "chokidar";
|
|
30
25
|
var LogColor, __webpack_modules__ = {
|
|
31
|
-
"compiled/webpack-bundle-analyzer": function(module) {
|
|
32
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__compiled_webpack_bundle_analyzer_index_js_1177eada__;
|
|
33
|
-
},
|
|
34
26
|
"compiled/webpack-merge": function(module) {
|
|
35
27
|
module.exports = __WEBPACK_EXTERNAL_MODULE__compiled_webpack_merge_index_js_efd91626__;
|
|
36
28
|
}
|
|
37
29
|
}, __webpack_module_cache__ = {};
|
|
38
|
-
function __webpack_require__(moduleId) {
|
|
39
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
40
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
41
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
42
|
-
exports: {}
|
|
43
|
-
};
|
|
44
|
-
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
45
|
-
}
|
|
46
30
|
let colors = {
|
|
47
31
|
...picocolors,
|
|
48
32
|
rainbow: (input)=>{
|
|
@@ -90,7 +74,14 @@ let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULE
|
|
|
90
74
|
|
|
91
75
|
</html>`;
|
|
92
76
|
var utils_dirname = __webpack_dirname__(__webpack_fileURLToPath__(import.meta.url));
|
|
93
|
-
let { merge } = __webpack_require__(
|
|
77
|
+
let { merge } = function __webpack_require__(moduleId) {
|
|
78
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
79
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
80
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
81
|
+
exports: {}
|
|
82
|
+
};
|
|
83
|
+
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
84
|
+
}("compiled/webpack-merge"), getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
|
|
94
85
|
process.env.NODE_ENV = env;
|
|
95
86
|
}, setDevServer = (isDevServer)=>{
|
|
96
87
|
process.env.DEV_SERVER = isDevServer ? 'true' : 'false';
|
|
@@ -337,7 +328,7 @@ async function loadConfig({ cliOptions, command }) {
|
|
|
337
328
|
} else {
|
|
338
329
|
logger_logger.debug('loading config file with jiti:', colors.dim(configFilePath));
|
|
339
330
|
try {
|
|
340
|
-
let jiti = createJiti(config_filename, {
|
|
331
|
+
let { createJiti } = await import("jiti"), jiti = createJiti(config_filename, {
|
|
341
332
|
moduleCache: !1,
|
|
342
333
|
interopDefault: !0,
|
|
343
334
|
nativeModules: [
|
|
@@ -434,6 +425,13 @@ function getNormalizedPluginsByHook(hook, plugins) {
|
|
|
434
425
|
plugin[hook] && pluginMap.set(plugin.name, plugin);
|
|
435
426
|
}), Array.from(pluginMap.values());
|
|
436
427
|
}
|
|
428
|
+
async function applyBundleAnalyzeConfig({ config }) {
|
|
429
|
+
var _config_plugins;
|
|
430
|
+
let { default: { BundleAnalyzerPlugin } } = await import("../compiled/webpack-bundle-analyzer/index.js");
|
|
431
|
+
return null == (_config_plugins = config.plugins) || _config_plugins.push(new BundleAnalyzerPlugin({
|
|
432
|
+
analyzerPort: 'auto'
|
|
433
|
+
})), config;
|
|
434
|
+
}
|
|
437
435
|
async function getBuildDependencies(root, userBuildDependencies, envFilePaths) {
|
|
438
436
|
let rootPackageJson = node_path.join(root, 'package.json'), browserslistConfig = node_path.join(root, '.browserslistrc'), tsconfigPath = node_path.join(root, 'tsconfig.json'), buildDependencies = {};
|
|
439
437
|
await isFileExists(rootPackageJson) && (buildDependencies.packageJson = [
|
|
@@ -645,7 +643,7 @@ class JsMinifyPlugin {
|
|
|
645
643
|
apply(compiler) {
|
|
646
644
|
let meta = JSON.stringify({
|
|
647
645
|
name: jsMinify_PLUGIN_NAME,
|
|
648
|
-
version: "3.3.
|
|
646
|
+
version: "3.3.2",
|
|
649
647
|
options: this.minifyOptions
|
|
650
648
|
});
|
|
651
649
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -931,9 +929,37 @@ class ProgressRspackPlugin extends rspack.ProgressPlugin {
|
|
|
931
929
|
}) : this[key] = value;
|
|
932
930
|
}
|
|
933
931
|
}
|
|
934
|
-
|
|
932
|
+
async function applyTypeCheckConfig({ config, unpackConfig }) {
|
|
933
|
+
var _config_plugins;
|
|
934
|
+
let { TsCheckerRspackPlugin } = await import("ts-checker-rspack-plugin"), tsconfigPath = node_path.resolve(unpackConfig.root, 'tsconfig.json');
|
|
935
|
+
return null == (_config_plugins = config.plugins) || _config_plugins.push(new TsCheckerRspackPlugin({
|
|
936
|
+
typescript: {
|
|
937
|
+
mode: 'readonly',
|
|
938
|
+
memoryLimit: 8192,
|
|
939
|
+
configFile: tsconfigPath,
|
|
940
|
+
typescriptPath: require.resolve("typescript", {
|
|
941
|
+
paths: [
|
|
942
|
+
unpackConfig.root
|
|
943
|
+
]
|
|
944
|
+
})
|
|
945
|
+
},
|
|
946
|
+
issue: {
|
|
947
|
+
exclude: [
|
|
948
|
+
({ file = '' })=>NODE_MODULES_REGEX.test(file)
|
|
949
|
+
]
|
|
950
|
+
},
|
|
951
|
+
logger: {
|
|
952
|
+
log (message) {
|
|
953
|
+
message.includes('Found') && console.log(message.split(' in ')[0]);
|
|
954
|
+
},
|
|
955
|
+
error (message) {
|
|
956
|
+
message.includes('RpcExitError') || message.includes('out of memory') || console.log(message.replace(/ERROR/g, 'Type Error'));
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
})), config;
|
|
960
|
+
}
|
|
935
961
|
async function getBundlerConfig(originalUnpackConfig) {
|
|
936
|
-
var _unpackConfig_build, _unpackConfig_build1, _unpackConfig_build2, _unpackConfig_build3, _unpackConfig_build4, _unpackConfig_build5, _unpackConfig_build6, _unpackConfig_html, _unpackConfig_html1, _unpackConfig_html2, _unpackConfig_html3, _unpackConfig_html4, _unpackConfig_html5, _unpackConfig_html6, _unpackConfig_html7, _unpackConfig_performance,
|
|
962
|
+
var _unpackConfig_build, _unpackConfig_build1, _unpackConfig_build2, _unpackConfig_build3, _unpackConfig_build4, _unpackConfig_build5, _unpackConfig_build6, _unpackConfig_html, _unpackConfig_html1, _unpackConfig_html2, _unpackConfig_html3, _unpackConfig_html4, _unpackConfig_html5, _unpackConfig_html6, _unpackConfig_html7, _unpackConfig_performance, _unpackConfig_build7, _unpackConfig_resolve, _unpackConfig_resolve1, _unpackConfig_dev, _unpackConfig_build8, _unpackConfig_experiments, _unpackConfig_build9, _unpackConfig_dev1, _unpackConfig_performance1;
|
|
937
963
|
let circularCount, { plugins, bundlerConfig, ...rest } = originalUnpackConfig;
|
|
938
964
|
for (let plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
939
965
|
...originalUnpackConfig._context,
|
|
@@ -1063,41 +1089,13 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1063
1089
|
'main'
|
|
1064
1090
|
]
|
|
1065
1091
|
}),
|
|
1066
|
-
(null == (_unpackConfig_performance = unpackConfig.performance) ? void 0 : _unpackConfig_performance.
|
|
1067
|
-
analyzerPort: 'auto'
|
|
1068
|
-
}),
|
|
1069
|
-
(null == (_unpackConfig_performance1 = unpackConfig.performance) ? void 0 : _unpackConfig_performance1.removeMomentLocale) && new rspack.IgnorePlugin({
|
|
1092
|
+
(null == (_unpackConfig_performance = unpackConfig.performance) ? void 0 : _unpackConfig_performance.removeMomentLocale) && new rspack.IgnorePlugin({
|
|
1070
1093
|
resourceRegExp: /^\.\/locale$/,
|
|
1071
1094
|
contextRegExp: /moment$/
|
|
1072
1095
|
}),
|
|
1073
1096
|
(null == (_unpackConfig_build7 = unpackConfig.build) ? void 0 : _unpackConfig_build7.copy) && new rspack.CopyRspackPlugin({
|
|
1074
1097
|
patterns: unpackConfig.build.copy
|
|
1075
1098
|
}),
|
|
1076
|
-
unpackConfig.typeCheck && isDev() && isTs && new TsCheckerRspackPlugin({
|
|
1077
|
-
typescript: {
|
|
1078
|
-
mode: 'readonly',
|
|
1079
|
-
memoryLimit: 8192,
|
|
1080
|
-
configFile: tsconfigPath,
|
|
1081
|
-
typescriptPath: require.resolve("typescript", {
|
|
1082
|
-
paths: [
|
|
1083
|
-
unpackConfig.root
|
|
1084
|
-
]
|
|
1085
|
-
})
|
|
1086
|
-
},
|
|
1087
|
-
issue: {
|
|
1088
|
-
exclude: [
|
|
1089
|
-
({ file = '' })=>NODE_MODULES_REGEX.test(file)
|
|
1090
|
-
]
|
|
1091
|
-
},
|
|
1092
|
-
logger: {
|
|
1093
|
-
log (message) {
|
|
1094
|
-
message.includes('Found') && console.log(message.split(' in ')[0]);
|
|
1095
|
-
},
|
|
1096
|
-
error (message) {
|
|
1097
|
-
message.includes('RpcExitError') || message.includes('out of memory') || console.log(message.replace(/ERROR/g, 'Type Error'));
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
}),
|
|
1101
1099
|
new ProgressPlugin(),
|
|
1102
1100
|
unpackConfig.lint && new OxlintPlugin(),
|
|
1103
1101
|
unpackConfig.detectCircular && (circularCount = 0, new rspack.CircularDependencyRspackPlugin({
|
|
@@ -1490,6 +1488,11 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1490
1488
|
config,
|
|
1491
1489
|
unpackConfig,
|
|
1492
1490
|
envFilePaths
|
|
1491
|
+
})), (null == (_unpackConfig_performance1 = unpackConfig.performance) ? void 0 : _unpackConfig_performance1.bundleAnalyze) && isProd() && (config = await applyBundleAnalyzeConfig({
|
|
1492
|
+
config
|
|
1493
|
+
})), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
|
|
1494
|
+
config,
|
|
1495
|
+
unpackConfig
|
|
1493
1496
|
})), getNormalizedPluginsByHook('bundlerConfig', unpackConfig.plugins)))config = await plugin.bundlerConfig(config, {
|
|
1494
1497
|
...unpackConfig._context,
|
|
1495
1498
|
unpackConfig,
|
|
@@ -1743,7 +1746,10 @@ let getExternalLibraryName = (pkgName)=>({
|
|
|
1743
1746
|
cacheDir = node_path.dirname(failedDepsCachePath), node_fs.existsSync(cacheDir) || node_fs.mkdirSync(cacheDir, {
|
|
1744
1747
|
recursive: !0
|
|
1745
1748
|
}), node_fs.writeFileSync(failedDepsCachePath, JSON.stringify(failedCache, null, 2), 'utf-8'), failedDeps[0] && logger_logger.warn(`something went wrong while optimizing "${colors.bold(failedDeps.join(', '))}"`);
|
|
1746
|
-
let cachePath = node_path.resolve(root, TEMP_DIR, 'umd'),
|
|
1749
|
+
let cachePath = node_path.resolve(root, TEMP_DIR, 'umd'), [{ default: express }, { default: cors }] = await Promise.all([
|
|
1750
|
+
import("express"),
|
|
1751
|
+
import("cors")
|
|
1752
|
+
]), app = express();
|
|
1747
1753
|
app.use(cors()), app.use("/umd", express.static(cachePath));
|
|
1748
1754
|
let port = await getPort(), staticServer = app.listen(port, ()=>{});
|
|
1749
1755
|
addRestartCleaner(()=>new Promise((resolve)=>staticServer.close(()=>resolve())));
|
|
@@ -1831,7 +1837,7 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
1831
1837
|
(null == (_req_headers_accept = req.headers.accept) ? void 0 : _req_headers_accept.includes('html')) && (req.url = '/index.html'), next();
|
|
1832
1838
|
}), middlewares.unshift(experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1833
1839
|
let server = new RspackDevServer(devServerOptions, compiler);
|
|
1834
|
-
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.
|
|
1840
|
+
await server.start(), logger_logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.3.2`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ms\n`), printAddressUrls(port, null == (_unpackConfig_server2 = unpackConfig.server) ? void 0 : _unpackConfig_server2.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1835
1841
|
let open = null == (_unpackConfig_server3 = unpackConfig.server) ? void 0 : _unpackConfig_server3.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1836
1842
|
open && openBrowser(url), setupCliShortcuts({
|
|
1837
1843
|
openPage: async ()=>{
|
|
@@ -1905,7 +1911,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1905
1911
|
...mergeConfig(defaultConfig, config),
|
|
1906
1912
|
_context: {
|
|
1907
1913
|
callerName,
|
|
1908
|
-
version: "3.3.
|
|
1914
|
+
version: "3.3.2"
|
|
1909
1915
|
}
|
|
1910
1916
|
};
|
|
1911
1917
|
};
|
|
@@ -1913,7 +1919,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
1913
1919
|
build: async ({ watch } = {})=>{
|
|
1914
1920
|
setNodeEnv(watch ? 'development' : 'production');
|
|
1915
1921
|
let config = resolveConfig();
|
|
1916
|
-
console.log(colors.rainbow(`${callerName} v3.3.
|
|
1922
|
+
console.log(colors.rainbow(`${callerName} v3.3.2`), colors.green(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
1917
1923
|
},
|
|
1918
1924
|
dev: async ()=>{
|
|
1919
1925
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundleAnalyze.d.ts","sourceRoot":"","sources":["../../src/bundler-config/bundleAnalyze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAErD,wBAAsB,wBAAwB,CAAC,EAC7C,MAAM,GACP,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;CAC7B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAUhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAsBnE,wBAAsB,gBAAgB,CACpC,oBAAoB,EAAE,YAAY,GACjC,OAAO,CAAC,oBAAoB,CAAC,CA4T/B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BundlerConfiguration, UnpackConfig } from '../types';
|
|
2
|
+
export declare function applyTypeCheckConfig({ config, unpackConfig, }: {
|
|
3
|
+
config: BundlerConfiguration;
|
|
4
|
+
unpackConfig: UnpackConfig;
|
|
5
|
+
}): Promise<BundlerConfiguration>;
|
|
6
|
+
//# sourceMappingURL=typeCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeCheck.d.ts","sourceRoot":"","sources":["../../src/bundler-config/typeCheck.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAEnE,wBAAsB,oBAAoB,CAAC,EACzC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAqChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAK3E,wBAAsB,UAAU,CAAC,EAC/B,UAAU,EACV,OAAO,GACR,EAAE;IACD,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAAC,YAAY,CAAC,CA8DxB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,OAAO,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;AACjF,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,CAAA;AACvE,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,CAAA;AACxF,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAAA;AAChE,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAA;AAC5E,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,CAAA;AAC9E,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAA;AAK5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,iBAuBpE"}
|
|
@@ -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":"AASA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AA8EnD,eAAO,MAAM,aAAa,GAAU,mBAEjC;IACD,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,OAAO,CAAC,YAAY,CAiSvB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpackjs/core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
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.
|
|
34
|
+
"sass-embedded": "1.93.1",
|
|
35
35
|
"sass-loader": "16.0.5",
|
|
36
36
|
"semver": "7.7.2",
|
|
37
37
|
"style-loader": "4.0.0",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"webpack-merge": "6.0.1"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@rspack/core": "1.5.
|
|
42
|
+
"@rspack/core": "1.5.6",
|
|
43
43
|
"@rspack/dev-server": "1.1.4",
|
|
44
44
|
"@types/less": "3.0.8",
|
|
45
45
|
"chokidar": "4.0.3",
|
|
46
46
|
"cors": "2.8.5",
|
|
47
47
|
"dotenv-expand": "12.0.3",
|
|
48
48
|
"express": "5.1.0",
|
|
49
|
-
"jiti": "2.
|
|
50
|
-
"oxc-minify": "0.
|
|
49
|
+
"jiti": "2.6.0",
|
|
50
|
+
"oxc-minify": "0.91.0",
|
|
51
51
|
"picocolors": "1.1.1",
|
|
52
52
|
"portfinder": "1.0.38",
|
|
53
53
|
"postcss": "8.5.6",
|