@unpackjs/core 3.8.3 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/css-loader/index.js +20 -20
- package/compiled/less-loader/index.js +8 -8
- package/compiled/postcss-loader/index.js +11 -11
- package/compiled/sass-loader/index.js +8 -8
- package/dist/index.js +84 -82
- package/dist/rslib-runtime.js +1 -1
- package/dist/transformLoader.js +3 -7
- package/dist/typedCssModulesLoader.js +3 -27
- package/dist-types/bundler-config/css.d.ts.map +1 -1
- package/dist-types/bundler-config/detectCircular.d.ts.map +1 -1
- package/dist-types/bundler-config/experimentCss.d.ts.map +1 -1
- package/dist-types/bundler-config/index.d.ts.map +1 -1
- package/dist-types/bundler-config/loaders/transformLoader.d.ts +1 -1
- package/dist-types/bundler-config/loaders/transformLoader.d.ts.map +1 -1
- package/dist-types/bundler-config/loaders/typedCssModulesLoader.d.ts +2 -4
- package/dist-types/bundler-config/loaders/typedCssModulesLoader.d.ts.map +1 -1
- package/dist-types/bundler-config/plugins/progress/helpers.d.ts.map +1 -1
- package/dist-types/constants.d.ts +4 -4
- package/dist-types/constants.d.ts.map +1 -1
- package/dist-types/createUnpack.d.ts.map +1 -1
- package/dist-types/plugins/autoCssModules.d.ts +3 -0
- package/dist-types/plugins/autoCssModules.d.ts.map +1 -0
- package/dist-types/plugins/prebundle.d.ts.map +1 -1
- package/dist-types/run/dev.d.ts.map +1 -1
- package/dist-types/types/config.d.ts +1 -14
- package/dist-types/types/config.d.ts.map +1 -1
- package/dist-types/types/plugin.d.ts +4 -1
- package/dist-types/types/plugin.d.ts.map +1 -1
- package/dist-types/utils.d.ts +4 -8
- package/dist-types/utils.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
375: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(4665);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(3764).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
4665: (__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__(587));
|
|
18
|
+
var _plugins = __nccwpck_require__(7862);
|
|
19
|
+
var _utils = __nccwpck_require__(3764);
|
|
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
|
+
7862: (__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__(9069),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(4764),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(2667));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
4764: (__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__(3764);
|
|
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
|
+
9069: (__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__(3764);
|
|
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
|
+
2667: (__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__(3764);
|
|
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
|
+
3764: (__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
|
+
587: (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__(375);
|
|
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
|
+
163: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(205)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
205: (__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__(959));
|
|
13
|
+
var _utils = __nccwpck_require__(280);
|
|
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
|
+
280: (__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
|
+
959: (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__(163);
|
|
344
344
|
module.exports = __webpack_exports__;
|
|
345
345
|
})();
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const promises_1 = __importDefault(__nccwpck_require__(1943));
|
|
25
25
|
const path_1 = __importDefault(__nccwpck_require__(6928));
|
|
26
26
|
const defaults_1 = __nccwpck_require__(5604);
|
|
27
|
-
const ExplorerBase_js_1 = __nccwpck_require__(
|
|
27
|
+
const ExplorerBase_js_1 = __nccwpck_require__(6636);
|
|
28
28
|
const merge_1 = __nccwpck_require__(6332);
|
|
29
29
|
const util_js_1 = __nccwpck_require__(6154);
|
|
30
30
|
class Explorer extends ExplorerBase_js_1.ExplorerBase {
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
}
|
|
225
225
|
exports.Explorer = Explorer;
|
|
226
226
|
},
|
|
227
|
-
|
|
227
|
+
6636: function (__unused_webpack_module, exports, __nccwpck_require__) {
|
|
228
228
|
"use strict";
|
|
229
229
|
var __importDefault =
|
|
230
230
|
(this && this.__importDefault) ||
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
|
377
377
|
const path_1 = __importDefault(__nccwpck_require__(6928));
|
|
378
378
|
const defaults_1 = __nccwpck_require__(5604);
|
|
379
|
-
const ExplorerBase_js_1 = __nccwpck_require__(
|
|
379
|
+
const ExplorerBase_js_1 = __nccwpck_require__(6636);
|
|
380
380
|
const merge_1 = __nccwpck_require__(6332);
|
|
381
381
|
const util_js_1 = __nccwpck_require__(6154);
|
|
382
382
|
class ExplorerSync extends ExplorerBase_js_1.ExplorerBase {
|
|
@@ -5319,19 +5319,19 @@
|
|
|
5319
5319
|
module.exports = createColors();
|
|
5320
5320
|
module.exports.createColors = createColors;
|
|
5321
5321
|
},
|
|
5322
|
-
|
|
5322
|
+
2643: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5323
5323
|
"use strict";
|
|
5324
|
-
module.exports = __nccwpck_require__(
|
|
5324
|
+
module.exports = __nccwpck_require__(8413)["default"];
|
|
5325
5325
|
},
|
|
5326
|
-
|
|
5326
|
+
8413: (__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__(6893));
|
|
5334
|
+
var _utils = __nccwpck_require__(3e3);
|
|
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
|
+
3e3: (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
|
+
6893: (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__(2643);
|
|
6734
6734
|
module.exports = __webpack_exports__;
|
|
6735
6735
|
})();
|
|
@@ -4795,19 +4795,19 @@
|
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
4798
|
-
|
|
4798
|
+
823: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4799
4799
|
"use strict";
|
|
4800
|
-
const loader = __nccwpck_require__(
|
|
4800
|
+
const loader = __nccwpck_require__(569);
|
|
4801
4801
|
module.exports = loader.default;
|
|
4802
4802
|
},
|
|
4803
|
-
|
|
4803
|
+
569: (__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__(703));
|
|
4810
|
+
var _utils = __nccwpck_require__(868);
|
|
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
|
+
868: (__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
|
+
703: (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__(823);
|
|
5602
5602
|
module.exports = __webpack_exports__;
|
|
5603
5603
|
})();
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let lastTrackTime, lastFileInfo, logger;
|
|
2
|
-
import __rslib_shim_module__ from
|
|
2
|
+
import __rslib_shim_module__ from "node:module";
|
|
3
3
|
let require = __rslib_shim_module__.createRequire(import.meta.url);
|
|
4
4
|
import { fileURLToPath as __rspack_fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import node_path, { dirname as __rspack_dirname, join, sep } from "node:path";
|
|
@@ -9,7 +9,6 @@ import { __webpack_require__ } from "./rslib-runtime.js";
|
|
|
9
9
|
import { rspack } from "@rspack/core";
|
|
10
10
|
import node_readline from "node:readline";
|
|
11
11
|
import node_fs from "node:fs";
|
|
12
|
-
import node_net from "node:net";
|
|
13
12
|
import node_os, { platform } from "node:os";
|
|
14
13
|
import portfinder from "portfinder";
|
|
15
14
|
import { format, promisify } from "node:util";
|
|
@@ -106,7 +105,7 @@ let restartCleaners = [], addRestartCleaner = (...cleaners)=>{
|
|
|
106
105
|
unpackStartTime = time;
|
|
107
106
|
};
|
|
108
107
|
var LogColor, logger_LogColor = ((LogColor = {}).error = "red", LogColor.warn = "yellow", LogColor.info = "cyan", LogColor.ready = "green", LogColor.event = "magenta", LogColor.wait = "blue", LogColor);
|
|
109
|
-
let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]',
|
|
108
|
+
let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULES_EXPORTS_CONVENTION = 'camel-case', DEV_DEFAULT_FILENAME = {
|
|
110
109
|
js: 'js/[name].js',
|
|
111
110
|
jsAsync: 'js/async/[name].js',
|
|
112
111
|
css: 'css/[name].css',
|
|
@@ -116,7 +115,7 @@ let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULE
|
|
|
116
115
|
jsAsync: 'js/async/[name].[contenthash:8].js',
|
|
117
116
|
css: 'css/[name].[contenthash:8].css',
|
|
118
117
|
cssAsync: 'css/async/[name].[contenthash:8].css'
|
|
119
|
-
},
|
|
118
|
+
}, NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/, ALL_INTERFACES_IPV4 = '0.0.0.0', LOCALHOST = 'localhost', TEMPLATE_CONTENT = ({ title = '', headTag = '', mountId = '' })=>`<!DOCTYPE html>
|
|
120
119
|
<html>
|
|
121
120
|
<head>
|
|
122
121
|
<meta charset="UTF-8">
|
|
@@ -191,17 +190,17 @@ let debounce = (fn, delay)=>{
|
|
|
191
190
|
}
|
|
192
191
|
return Array.from(ipv4Interfaces.values());
|
|
193
192
|
}, isLoopbackHost = (host)=>[
|
|
194
|
-
|
|
193
|
+
LOCALHOST,
|
|
195
194
|
'127.0.0.1',
|
|
196
195
|
'::1',
|
|
197
196
|
'0000:0000:0000:0000:0000:0000:0000:0001'
|
|
198
|
-
].includes(host), concatUrl = ({ host, port, protocol, base })=>`${protocol}://${host}:${port}${normalizePublicPath(base)}`, LOCAL_LABEL = 'Local: ',
|
|
199
|
-
if (host
|
|
197
|
+
].includes(host), concatUrl = ({ host, port, protocol, base })=>`${protocol}://${host}:${port}${normalizePublicPath(base)}`, LOCAL_LABEL = 'Local: ', getAddressUrls = ({ protocol = 'http', port, host, base })=>{
|
|
198
|
+
if (!host) return [
|
|
200
199
|
{
|
|
201
|
-
label:
|
|
200
|
+
label: LOCAL_LABEL,
|
|
202
201
|
url: concatUrl({
|
|
202
|
+
host: LOCALHOST,
|
|
203
203
|
port,
|
|
204
|
-
host: node_net.isIPv6(host) ? '::' === host ? '[::1]' : `[${host}]` : host,
|
|
205
204
|
protocol,
|
|
206
205
|
base
|
|
207
206
|
})
|
|
@@ -213,14 +212,14 @@ let debounce = (fn, delay)=>{
|
|
|
213
212
|
addressUrls.push({
|
|
214
213
|
label: LOCAL_LABEL,
|
|
215
214
|
url: concatUrl({
|
|
216
|
-
host:
|
|
215
|
+
host: LOCALHOST,
|
|
217
216
|
port,
|
|
218
217
|
protocol,
|
|
219
218
|
base
|
|
220
219
|
})
|
|
221
220
|
}), hasLocalUrl = !0;
|
|
222
221
|
} else addressUrls.push({
|
|
223
|
-
label:
|
|
222
|
+
label: 'Network: ',
|
|
224
223
|
url: concatUrl({
|
|
225
224
|
host: detail.address,
|
|
226
225
|
port,
|
|
@@ -247,12 +246,7 @@ function isNodeVersionAtLeast(major, minor) {
|
|
|
247
246
|
let [currMajor, currMinor] = process.versions.node.split('.').map(Number);
|
|
248
247
|
return currMajor > major || currMajor === major && currMinor >= minor;
|
|
249
248
|
}
|
|
250
|
-
let
|
|
251
|
-
if (!1 === modules) return !1;
|
|
252
|
-
isPlainObject(modules) || (modules = {});
|
|
253
|
-
let auto = modules.auto;
|
|
254
|
-
return !1 !== auto && (isRegExp(auto) ? auto.test(resourcePath) : isFunction(auto) ? auto(resourcePath) : CSS_MODULES_REGEX.test(resourcePath));
|
|
255
|
-
}, esVersionToBrowserslist = (esVersion)=>{
|
|
249
|
+
let esVersionToBrowserslist = (esVersion)=>{
|
|
256
250
|
let browsers = {
|
|
257
251
|
es2022: [
|
|
258
252
|
'chrome >= 94',
|
|
@@ -322,16 +316,13 @@ let pathToExportIdentifier = (path)=>{
|
|
|
322
316
|
function printServerUrls({ port, host, base }) {
|
|
323
317
|
let addressUrls = getAddressUrls({
|
|
324
318
|
port,
|
|
325
|
-
base
|
|
319
|
+
base,
|
|
320
|
+
host
|
|
326
321
|
}), colorPrefix = colors.brand('➜');
|
|
327
|
-
addressUrls.forEach((addr
|
|
322
|
+
addressUrls.forEach((addr)=>{
|
|
328
323
|
let url;
|
|
329
|
-
if (!host && 0 !== index) {
|
|
330
|
-
1 === index && console.log(` ${colors.dim(colorPrefix)} ${colors.bold(colors.dim('Network:'))} ${colors.dim('use')} ${colors.bold('--host')} ${colors.dim('to expose')}`);
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
324
|
console.log(` ${colorPrefix} ${colors.bold(addr.label)}${(url = addr.url, colors.cyan(url.replace(/:(\d+)\//, (_, port)=>`:${colors.bold(port)}/`)))}`);
|
|
334
|
-
});
|
|
325
|
+
}), host || console.log(` ${colors.dim(colorPrefix)} ${colors.bold(colors.dim('Network:'))} ${colors.dim('use')} ${colors.bold('--host')} ${colors.dim('to expose')}`);
|
|
335
326
|
}
|
|
336
327
|
function getHtmlTemplateOrContent(rawTemplate, root) {
|
|
337
328
|
let template, templateContent;
|
|
@@ -537,7 +528,12 @@ let removeDir = (dir)=>{
|
|
|
537
528
|
recursive: !0,
|
|
538
529
|
force: !0
|
|
539
530
|
});
|
|
540
|
-
},
|
|
531
|
+
}, STYLE_IMPORT_RE = /import\s+([\s\S]+?)\s+from\s+(['"])(.*?\.(?:css|less|scss|sass))\2/g, TYPE_IMPORT_CLAUSE_RE = /^\s*type\b/, STYLE_EXT_HINTS = [
|
|
532
|
+
'.css',
|
|
533
|
+
'.less',
|
|
534
|
+
'.scss',
|
|
535
|
+
'.sass'
|
|
536
|
+
], BROWSER_LOGS_ENDPOINT = '/__browser_logs__', browserLogs_SCRIPT_REGEX = /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte)$/, gzip = promisify(node_zlib.gzip), numberFormatter = new Intl.NumberFormat('en', {
|
|
541
537
|
maximumFractionDigits: 2,
|
|
542
538
|
minimumFractionDigits: 2
|
|
543
539
|
}), displaySize = (bytes)=>`${numberFormatter.format(bytes / 1000)} kB`;
|
|
@@ -758,7 +754,7 @@ class JsMinifyPlugin {
|
|
|
758
754
|
apply(compiler) {
|
|
759
755
|
let meta = JSON.stringify({
|
|
760
756
|
name: jsMinify_PLUGIN_NAME,
|
|
761
|
-
version: "3.
|
|
757
|
+
version: "3.9.1",
|
|
762
758
|
options: this.minifyOptions
|
|
763
759
|
});
|
|
764
760
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -868,7 +864,7 @@ async function compileDone(compiler, stats) {
|
|
|
868
864
|
(packageName = '.pnpm' === pathParts[0] && pathParts.length >= 4 ? pathParts[3].startsWith('@') ? `${pathParts[3]}/${pathParts[4]}` : pathParts[3] : pathParts[0].startsWith('@') ? `${pathParts[0]}/${pathParts[1]}` : pathParts[0]) && (nodeModulesStats[packageName] = (nodeModulesStats[packageName] || 0) + 1);
|
|
869
865
|
}
|
|
870
866
|
}), nodeModulesStats)).sort((a, b)=>a[1] - b[1]).forEach(([packageName, count])=>{
|
|
871
|
-
logger_logger.debug(`${colors.cyan(packageName)}: ${colors.yellow(count)} modules`);
|
|
867
|
+
count > 10 && logger_logger.debug(`${colors.cyan(packageName)}: ${colors.yellow(count)} modules`);
|
|
872
868
|
});
|
|
873
869
|
}
|
|
874
870
|
isDebug() || logger_logger.clear(), console.log(colors.dim(getTime()), colors.cyan(`[${getCurrentUnpackConfig()._context.callerName}]`), colors.brand(utils_isDevServer() ? 'hmr update' : 'build'), `${colors.dim(fileInfo)}${sameCount > 1 ? ` ${colors.yellow(`(x${sameCount})`)}` : ''}`, isDebug() ? colors.dim(`| ${prettyTime(getCompileTime(stats))} (${stats.compilation.modules.size} modules)`) : '');
|
|
@@ -1147,20 +1143,24 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1147
1143
|
performance: {
|
|
1148
1144
|
hints: !1
|
|
1149
1145
|
}
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1146
|
+
};
|
|
1147
|
+
for (let plugin of getNormalizedPluginsByHook('transform')){
|
|
1148
|
+
let { filter, handler } = plugin.transform;
|
|
1149
|
+
config.module.rules.push({
|
|
1150
|
+
exclude: NODE_MODULES_REGEX,
|
|
1151
|
+
...filter,
|
|
1152
|
+
enforce: 'pre',
|
|
1153
|
+
use: [
|
|
1154
|
+
{
|
|
1155
|
+
loader: node_path.resolve(bundler_config_dirname, './transformLoader.js'),
|
|
1156
|
+
options: {
|
|
1157
|
+
handler
|
|
1158
|
+
}
|
|
1160
1159
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
}
|
|
1160
|
+
]
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
return config = (({ config, unpackConfig })=>{
|
|
1164
1164
|
let { chunkSplit } = unpackConfig.performance || {};
|
|
1165
1165
|
if (chunkSplit?.strategy) {
|
|
1166
1166
|
let forceSplittingGroups = {};
|
|
@@ -1202,8 +1202,8 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1202
1202
|
'experiments',
|
|
1203
1203
|
'css'
|
|
1204
1204
|
], !0);
|
|
1205
|
-
let sourceMap = unpackConfig.css?.sourceMap
|
|
1206
|
-
|
|
1205
|
+
let sourceMap = unpackConfig.css?.sourceMap;
|
|
1206
|
+
set(config, [
|
|
1207
1207
|
'module',
|
|
1208
1208
|
'parser',
|
|
1209
1209
|
'css/module'
|
|
@@ -1214,18 +1214,14 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1214
1214
|
'generator',
|
|
1215
1215
|
'css/module'
|
|
1216
1216
|
], {
|
|
1217
|
-
localIdentName:
|
|
1218
|
-
exportsConvention:
|
|
1219
|
-
})
|
|
1220
|
-
let withCssModules = ({ use })=>{
|
|
1221
|
-
|
|
1222
|
-
let auto = modules.auto;
|
|
1223
|
-
return !1 !== auto && {
|
|
1224
|
-
test: (resourcePath)=>resourcePath.includes('node_modules') ? CSS_MODULES_REGEX.test(resourcePath) : isRegExp(auto) ? auto.test(resourcePath) : isFunction(auto) ? auto(resourcePath) : CSS_MODULES_REGEX.test(resourcePath),
|
|
1217
|
+
localIdentName: CSS_MODULES_LOCAL_IDENT_NAME,
|
|
1218
|
+
exportsConvention: CSS_MODULES_EXPORTS_CONVENTION
|
|
1219
|
+
});
|
|
1220
|
+
let withCssModules = ({ use })=>({
|
|
1221
|
+
resourceQuery: /[?&]module(?:[=&]|$)/,
|
|
1225
1222
|
use,
|
|
1226
1223
|
type: 'css/module'
|
|
1227
|
-
}
|
|
1228
|
-
}, getLessLoader = ()=>({
|
|
1224
|
+
}), getLessLoader = ()=>({
|
|
1229
1225
|
loader: getCompiledPkgPath('less-loader'),
|
|
1230
1226
|
options: {
|
|
1231
1227
|
lessOptions: mergeConfig({
|
|
@@ -1312,9 +1308,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1312
1308
|
config,
|
|
1313
1309
|
unpackConfig
|
|
1314
1310
|
}) : function({ config, unpackConfig }) {
|
|
1315
|
-
let sourceMap = unpackConfig.css?.sourceMap,
|
|
1316
|
-
isPlainObject(modules) || !1 === modules || (modules = {});
|
|
1317
|
-
let getCommonRules = ({ importLoaders })=>[
|
|
1311
|
+
let sourceMap = unpackConfig.css?.sourceMap, getCommonRules = ({ importLoaders })=>[
|
|
1318
1312
|
utils_isDevServer() ? {
|
|
1319
1313
|
loader: getCompiledPkgPath('style-loader')
|
|
1320
1314
|
} : {
|
|
@@ -1324,23 +1318,16 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1324
1318
|
}
|
|
1325
1319
|
},
|
|
1326
1320
|
isDev() && {
|
|
1327
|
-
loader: node_path.resolve(css_dirname, './typedCssModulesLoader.js')
|
|
1328
|
-
options: {
|
|
1329
|
-
modules
|
|
1330
|
-
}
|
|
1321
|
+
loader: node_path.resolve(css_dirname, './typedCssModulesLoader.js')
|
|
1331
1322
|
},
|
|
1332
1323
|
{
|
|
1333
1324
|
loader: getCompiledPkgPath('css-loader'),
|
|
1334
1325
|
options: {
|
|
1335
1326
|
importLoaders,
|
|
1336
1327
|
modules: {
|
|
1337
|
-
auto: (()
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
return !1 !== auto && ((resourcePath)=>resourcePath.includes('node_modules') ? CSS_MODULES_REGEX.test(resourcePath) : isRegExp(auto) ? auto.test(resourcePath) : isFunction(auto) ? auto(resourcePath) : CSS_MODULES_REGEX.test(resourcePath));
|
|
1341
|
-
})(),
|
|
1342
|
-
localIdentName: !1 !== modules && (modules.localIdentName || CSS_MODULES_LOCAL_IDENT_NAME),
|
|
1343
|
-
exportLocalsConvention: EXPORT_LOCALS_CONVENTION,
|
|
1328
|
+
auto: (_, resourceQuery)=>resourceQuery?.includes('module'),
|
|
1329
|
+
localIdentName: CSS_MODULES_LOCAL_IDENT_NAME,
|
|
1330
|
+
exportLocalsConvention: CSS_MODULES_EXPORTS_CONVENTION,
|
|
1344
1331
|
namedExport: !1
|
|
1345
1332
|
},
|
|
1346
1333
|
sourceMap
|
|
@@ -1439,7 +1426,7 @@ async function getBundlerConfig(originalUnpackConfig) {
|
|
|
1439
1426
|
unpackConfig
|
|
1440
1427
|
})), unpackConfig.detectCircular && (config = function({ config, unpackConfig }) {
|
|
1441
1428
|
let circularCount = 0, circularDependencyPlugin = new rspack.CircularDependencyRspackPlugin({
|
|
1442
|
-
exclude:
|
|
1429
|
+
exclude: NODE_MODULES_REGEX,
|
|
1443
1430
|
onStart () {
|
|
1444
1431
|
circularCount = 0;
|
|
1445
1432
|
},
|
|
@@ -1582,7 +1569,8 @@ async function unpackDev(unpackConfig) {
|
|
|
1582
1569
|
devMiddleware: {
|
|
1583
1570
|
publicPath: devPublicPath,
|
|
1584
1571
|
writeToDisk: unpackConfig.dev?.writeToDisk
|
|
1585
|
-
}
|
|
1572
|
+
},
|
|
1573
|
+
host: unpackConfig.server?.host ? ALL_INTERFACES_IPV4 : LOCALHOST
|
|
1586
1574
|
}, pluginMiddlewares = [];
|
|
1587
1575
|
await applyPluginsByHook('setupMiddlewares', async (impl)=>{
|
|
1588
1576
|
pluginMiddlewares = await impl(pluginMiddlewares);
|
|
@@ -1598,9 +1586,9 @@ async function unpackDev(unpackConfig) {
|
|
|
1598
1586
|
...middlewares
|
|
1599
1587
|
]);
|
|
1600
1588
|
let server = new RspackDevServer(devServerOptions, compiler);
|
|
1601
|
-
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.
|
|
1589
|
+
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.9.1${unpackConfig.performance?.cache ? ' ϟ' : ''}`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - getUnpackStartTime()))} ${colors.dim('ms')}\n`), printServerUrls({
|
|
1602
1590
|
port,
|
|
1603
|
-
host: unpackConfig.server
|
|
1591
|
+
host: unpackConfig.server.host,
|
|
1604
1592
|
base: unpackConfig.base
|
|
1605
1593
|
}), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1606
1594
|
let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}${devPublicPath}`;
|
|
@@ -1612,7 +1600,7 @@ async function unpackDev(unpackConfig) {
|
|
|
1612
1600
|
function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'unpack' }) {
|
|
1613
1601
|
let _context = {
|
|
1614
1602
|
callerName,
|
|
1615
|
-
version: "3.
|
|
1603
|
+
version: "3.9.1",
|
|
1616
1604
|
cachePath: 'node_modules/.unpack'
|
|
1617
1605
|
}, resolveConfig = (mode)=>{
|
|
1618
1606
|
let rootPath, outputPath, basePath, cachedTraceMap, fs, isValidMethodName, parseFrame, formatOriginalLocation, formatFullStack, resolveErrorLocationAndStack, shouldTransformDeepImport, preJsAssets, jsAssets, cssAssets, bundledDepsCachePath, deepImportPkgPattern, deepImportRegex, root;
|
|
@@ -1628,13 +1616,13 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
1628
1616
|
target: 'es2023'
|
|
1629
1617
|
},
|
|
1630
1618
|
server: {
|
|
1631
|
-
port: 3000
|
|
1619
|
+
port: 3000,
|
|
1620
|
+
host: !1
|
|
1632
1621
|
},
|
|
1633
1622
|
html: {
|
|
1634
1623
|
mountId: 'root'
|
|
1635
1624
|
},
|
|
1636
1625
|
css: {
|
|
1637
|
-
modules: !0,
|
|
1638
1626
|
transformer: 'postcss',
|
|
1639
1627
|
sourceMap: !1
|
|
1640
1628
|
},
|
|
@@ -1650,6 +1638,15 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
1650
1638
|
'PUBLIC_'
|
|
1651
1639
|
],
|
|
1652
1640
|
plugins: [
|
|
1641
|
+
{
|
|
1642
|
+
name: 'unpack:auto-css-modules',
|
|
1643
|
+
transform: {
|
|
1644
|
+
filter: {
|
|
1645
|
+
test: JSX_REGEX
|
|
1646
|
+
},
|
|
1647
|
+
handler: (code)=>STYLE_EXT_HINTS.some((ext)=>code.includes(ext)) ? code.replace(STYLE_IMPORT_RE, (full, importClause, quote, spec)=>TYPE_IMPORT_CLAUSE_RE.test(importClause) || spec.includes('?') || spec.includes('#') ? full : `import ${importClause} from ${quote}${spec}?module${quote}`) : null
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1653
1650
|
(rootPath = '', outputPath = '', basePath = '/', cachedTraceMap = new Map(), fs = null, isValidMethodName = (methodName)=>'<unknown>' !== methodName && !/[\\/]/.test(methodName), parseFrame = async (frame)=>{
|
|
1654
1651
|
let { file, column, lineNumber } = frame;
|
|
1655
1652
|
if (!file || null == lineNumber || null == column) return;
|
|
@@ -1895,10 +1892,10 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
1895
1892
|
})(formattedArgs), prefix = colors.dim(`[browser ${time}]`);
|
|
1896
1893
|
switch(console.log(''), level){
|
|
1897
1894
|
case 'error':
|
|
1898
|
-
logger_logger.error(`${prefix} ${outputArgs
|
|
1895
|
+
logger_logger.error(`${prefix} ${format(...outputArgs)}`);
|
|
1899
1896
|
break;
|
|
1900
1897
|
case 'warn':
|
|
1901
|
-
logger_logger.warn(`${prefix} ${outputArgs
|
|
1898
|
+
logger_logger.warn(`${prefix} ${format(...outputArgs)}`);
|
|
1902
1899
|
break;
|
|
1903
1900
|
case 'debug':
|
|
1904
1901
|
logger_logger.info(prefix, ...outputArgs);
|
|
@@ -2149,10 +2146,15 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
2149
2146
|
...existingExternals
|
|
2150
2147
|
], config;
|
|
2151
2148
|
},
|
|
2152
|
-
transform:
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
}
|
|
2149
|
+
transform: {
|
|
2150
|
+
filter: {
|
|
2151
|
+
test: JSX_REGEX
|
|
2152
|
+
},
|
|
2153
|
+
handler: (code)=>shouldTransformDeepImport && SPECIAL_NO_ENTRY_DEPS.some((pkg)=>code.includes(pkg)) ? code.replace(deepImportRegex, (_, localName, importPath, pkgName)=>{
|
|
2154
|
+
let exportName = pathToExportIdentifier(importPath.slice(pkgName.length + 1));
|
|
2155
|
+
return `import { ${exportName} as ${localName} } from '${pkgName}'`;
|
|
2156
|
+
}) : null
|
|
2157
|
+
},
|
|
2156
2158
|
transformHtml: (html)=>injectToHead(html, preJsAssets.sort((a, b)=>a.order - b.order).map((item)=>item.path).map((item)=>`<script defer src="${item}"></script>`).join('')),
|
|
2157
2159
|
setupMiddlewares: (middlewares)=>[
|
|
2158
2160
|
(req, res, next)=>{
|
|
@@ -2268,7 +2270,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
|
|
|
2268
2270
|
let mode = watch ? 'development' : 'production';
|
|
2269
2271
|
setNodeEnv(mode);
|
|
2270
2272
|
let config = resolveConfig(mode);
|
|
2271
|
-
console.log(colors.brand(`${callerName} v3.
|
|
2273
|
+
console.log(colors.brand(`${callerName} v3.9.1${config.performance?.cache ? ' ϟ' : ''}`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
|
|
2272
2274
|
},
|
|
2273
2275
|
dev: async ()=>{
|
|
2274
2276
|
setUnpackStartTime(performance.now());
|
|
@@ -2296,5 +2298,5 @@ async function createChokidar(pathOrGlobs, root = process.cwd(), options) {
|
|
|
2296
2298
|
...options
|
|
2297
2299
|
});
|
|
2298
2300
|
}
|
|
2299
|
-
var
|
|
2300
|
-
export {
|
|
2301
|
+
var src_CSS_MODULES_NAMED_EXPORT = !1;
|
|
2302
|
+
export { ALL_INTERFACES_IPV4, CSS_MODULES_EXPORTS_CONVENTION, CSS_MODULES_LOCAL_IDENT_NAME, DEV_DEFAULT_FILENAME, JSX_REGEX, JS_REGEX, LOCALHOST, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, SCRIPT_REGEX, TEMPLATE_CONTENT, addRestartCleaner, cleanUpBeforeRestart, clearLine, colors, convertBasicAnsiColors, createChokidar, createUnpack, debounce, defineConfig, esVersionToBrowserslist, findExists, getAddressUrls, getCompiledPkgPath, getCurrentUnpackConfig, getHtmlTemplateOrContent, getIpv4Interfaces, getNodeEnv, getOrSetDefault, getPathInJs, getPort, getTime, getUnpackStartTime, getUserDepPath, getUserDepVersion, injectToHead, isBoolean, isDebug, isDev, isEmptyDir, isFileExists, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isRegExp, isString, isUndefined, isWatch, isWin, launchEditor, loadConfig, logUpdate, logger_LogColor as LogColor, logger_logger as logger, mergeConfig, normalizePublicPath, openBrowser, pLimit, pathExists, pathToExportIdentifier, prettyTime, printServerUrls, removeDir, resolveConfigPath, rspack, set, setCurrentUnpackConfig, setDevServer, setNodeEnv, setUnpackStartTime, setupCliShortcuts, src_CSS_MODULES_NAMED_EXPORT as CSS_MODULES_NAMED_EXPORT, trackPerformance, utils_isDevServer as isDevServer, utils_isProd as isProd };
|
package/dist/rslib-runtime.js
CHANGED
package/dist/transformLoader.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
export default function(content) {
|
|
2
|
-
let callback = this.async(), {
|
|
2
|
+
let callback = this.async(), { handler } = this.getOptions(), id = this.resourcePath;
|
|
3
3
|
(async ()=>{
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
let result = await plugin.transform(code, id);
|
|
7
|
-
'string' == typeof result && (code = result);
|
|
8
|
-
}
|
|
9
|
-
return code;
|
|
4
|
+
let result = await handler(content, id);
|
|
5
|
+
return 'string' == typeof result ? result : content;
|
|
10
6
|
})().then((code)=>callback(null, code)).catch((error)=>callback(error));
|
|
11
7
|
};
|
|
@@ -1,37 +1,13 @@
|
|
|
1
|
-
import * as __rspack_external__compiled_launch_editor_index_js_29002383 from "../compiled/launch-editor/index.js";
|
|
2
|
-
import * as __rspack_external__compiled_webpack_merge_index_js_efd91626 from "../compiled/webpack-merge/index.js";
|
|
3
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
1
|
import node_fs from "node:fs";
|
|
5
2
|
import node_path from "node:path";
|
|
6
|
-
|
|
7
|
-
import "node:os";
|
|
8
|
-
import "portfinder";
|
|
9
|
-
__webpack_require__.add({
|
|
10
|
-
"compiled/launch-editor" (module) {
|
|
11
|
-
module.exports = __rspack_external__compiled_launch_editor_index_js_29002383;
|
|
12
|
-
},
|
|
13
|
-
"compiled/webpack-merge" (module) {
|
|
14
|
-
module.exports = __rspack_external__compiled_webpack_merge_index_js_efd91626;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
let CSS_MODULES_REGEX = /\.module\.\w+$/i, NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/, { merge: mergeConfig } = __webpack_require__("compiled/webpack-merge"), { default: launchEditor } = __webpack_require__("compiled/launch-editor"), enforceLFLineSeparators = (text)=>text ? text.replace(/\r\n/g, '\n') : text;
|
|
3
|
+
let NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/, enforceLFLineSeparators = (text)=>text ? text.replace(/\r\n/g, '\n') : text;
|
|
18
4
|
export default function(content, ...rest) {
|
|
19
5
|
var keys;
|
|
20
6
|
let interfaceFields, bannerMessage, callback, dirName, baseName, filename, { failed, success } = (callback = this.async(), {
|
|
21
7
|
failed: (e)=>callback(e),
|
|
22
8
|
success: ()=>callback(null, content, ...rest)
|
|
23
|
-
}), { resourcePath
|
|
24
|
-
if (!((
|
|
25
|
-
var obj;
|
|
26
|
-
let obj1;
|
|
27
|
-
if (!1 === modules) return !1;
|
|
28
|
-
(null === (obj1 = obj = modules) || 'object' != typeof obj1 || '[object Object]' !== Object.prototype.toString.call(obj)) && (modules = {});
|
|
29
|
-
let auto = modules.auto;
|
|
30
|
-
return !1 !== auto && ('[object RegExp]' === Object.prototype.toString.call(auto) ? auto.test(resourcePath) : 'function' == typeof auto ? auto(resourcePath) : CSS_MODULES_REGEX.test(resourcePath));
|
|
31
|
-
})({
|
|
32
|
-
resourcePath,
|
|
33
|
-
modules
|
|
34
|
-
}) || NODE_MODULES_REGEX.test(resourcePath)) return void success();
|
|
9
|
+
}), { resourcePath, resourceQuery } = this;
|
|
10
|
+
if (!resourceQuery?.includes('module') || NODE_MODULES_REGEX.test(resourcePath)) return void success();
|
|
35
11
|
let { read, write } = (dirName = node_path.dirname(resourcePath), baseName = node_path.basename(resourcePath), filename = node_path.join(dirName, `${baseName}.d.ts`), {
|
|
36
12
|
read: (handler)=>node_fs.readFile(filename, {
|
|
37
13
|
encoding: 'utf-8'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/bundler-config/css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/bundler-config/css.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAU,YAAY,EAAE,MAAM,WAAW,CAAA;AAW3E,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CAqHvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectCircular.d.ts","sourceRoot":"","sources":["../../src/bundler-config/detectCircular.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"detectCircular.d.ts","sourceRoot":"","sources":["../../src/bundler-config/detectCircular.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAyBnE,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CAwCvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimentCss.d.ts","sourceRoot":"","sources":["../../src/bundler-config/experimentCss.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"experimentCss.d.ts","sourceRoot":"","sources":["../../src/bundler-config/experimentCss.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAU,YAAY,EAAE,MAAM,WAAW,CAAA;AAU3E,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,GAAG,oBAAoB,CAqHvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAA+B,MAAM,WAAW,CAAA;AAwBhG,wBAAsB,gBAAgB,CACpC,oBAAoB,EAAE,YAAY,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAmN/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rspack, UnpackPlugin } from '../../types';
|
|
2
2
|
export default function (this: Rspack.LoaderContext<{
|
|
3
|
-
|
|
3
|
+
handler: NonNullable<UnpackPlugin['transform']>['handler'];
|
|
4
4
|
}>, content: string): void;
|
|
5
5
|
//# sourceMappingURL=transformLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformLoader.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/loaders/transformLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAErD,MAAM,CAAC,OAAO,WACZ,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC;IAAE,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"transformLoader.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/loaders/transformLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAErD,MAAM,CAAC,OAAO,WACZ,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC;IAAE,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC,EAC1F,OAAO,EAAE,MAAM,GACd,IAAI,CAWN"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { Rspack
|
|
2
|
-
export default function (this: Rspack.LoaderContext
|
|
3
|
-
modules: NonNullable<UnpackConfig['css']>['modules'];
|
|
4
|
-
}>, content: string, ...rest: any[]): void;
|
|
1
|
+
import type { Rspack } from '../../types';
|
|
2
|
+
export default function (this: Rspack.LoaderContext, content: string, ...rest: any[]): void;
|
|
5
3
|
//# sourceMappingURL=typedCssModulesLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedCssModulesLoader.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/loaders/typedCssModulesLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"typedCssModulesLoader.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/loaders/typedCssModulesLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AA2GvC,MAAM,CAAC,OAAO,WAAW,IAAI,EAAE,MAAM,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CA4B1F"}
|
|
@@ -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;AAgIvC,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,iBAqC/E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const CSS_MODULES_LOCAL_IDENT_NAME = "[path][name]__[local]--[hash:5]";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CSS_MODULES_EXPORTS_CONVENTION = "camel-case";
|
|
3
|
+
export declare const CSS_MODULES_NAMED_EXPORT = false;
|
|
3
4
|
export declare const DEV_DEFAULT_FILENAME: {
|
|
4
5
|
js: string;
|
|
5
6
|
jsAsync: string;
|
|
@@ -12,10 +13,9 @@ export declare const PROD_DEFAULT_FILENAME: {
|
|
|
12
13
|
css: string;
|
|
13
14
|
cssAsync: string;
|
|
14
15
|
};
|
|
15
|
-
export declare const EXPORT_LOCALS_CONVENTION = "camel-case-only";
|
|
16
16
|
export declare const NODE_MODULES_REGEX: RegExp;
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
17
|
+
export declare const ALL_INTERFACES_IPV4 = "0.0.0.0";
|
|
18
|
+
export declare const LOCALHOST = "localhost";
|
|
19
19
|
export declare const TEMPLATE_CONTENT: ({ title, headTag, mountId }: {
|
|
20
20
|
title?: string | undefined;
|
|
21
21
|
headTag?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,oCAAoC,CAAA;AAC7E,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,oCAAoC,CAAA;AAC7E,eAAO,MAAM,8BAA8B,eAAe,CAAA;AAC1D,eAAO,MAAM,wBAAwB,QAAQ,CAAA;AAC7C,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAA;AACD,eAAO,MAAM,qBAAqB;;;;;CAKjC,CAAA;AACD,eAAO,MAAM,kBAAkB,QAA2B,CAAA;AAC1D,eAAO,MAAM,mBAAmB,YAAY,CAAA;AAC5C,eAAO,MAAM,SAAS,cAAc,CAAA;AACpC,eAAO,MAAM,gBAAgB,GAAI;;;;CAA0C,WAa1E,CAAA;AACD,eAAO,MAAM,QAAQ,QAAa,CAAA;AAClC,eAAO,MAAM,SAAS,QAAc,CAAA;AACpC,eAAO,MAAM,YAAY,QAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUnpack.d.ts","sourceRoot":"","sources":["../src/createUnpack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createUnpack.d.ts","sourceRoot":"","sources":["../src/createUnpack.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAW,YAAY,EAAiB,MAAM,SAAS,CAAA;AAwCnE,wBAAgB,YAAY,CAAC,EAC3B,GAAmB,EACnB,MAAM,EAAE,UAAU,EAClB,UAAqB,GACtB,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;wBAkB4B;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;;;;;;EA8B/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoCssModules.d.ts","sourceRoot":"","sources":["../../src/plugins/autoCssModules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAM7C,eAAO,MAAM,oBAAoB,QAAO,YAoBvC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebundle.d.ts","sourceRoot":"","sources":["../../src/plugins/prebundle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,WAAW,CAAA;AAkGnE,eAAO,MAAM,eAAe,QAAO,
|
|
1
|
+
{"version":3,"file":"prebundle.d.ts","sourceRoot":"","sources":["../../src/plugins/prebundle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,WAAW,CAAA;AAkGnE,eAAO,MAAM,eAAe,QAAO,YA8YlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/run/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/run/dev.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,WAAW,CAAA;AAInE,wBAAsB,SAAS,CAC7B,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAsFxC"}
|
|
@@ -68,20 +68,6 @@ export type UnpackConfig = {
|
|
|
68
68
|
* @default false
|
|
69
69
|
*/
|
|
70
70
|
sourceMap?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* @default true
|
|
73
|
-
* Enable CSS Modules for files matching `/\.module\.\w+$/i.test(filename)` regexp.
|
|
74
|
-
*/
|
|
75
|
-
modules?: boolean | {
|
|
76
|
-
/**
|
|
77
|
-
* `undefined` or `true` - Enable CSS Modules for files matching `/\.module\.\w+$/i.test(filename)` regexp.
|
|
78
|
-
* `false` - Disable CSS Modules.
|
|
79
|
-
* `RegExp` - Enable CSS modules for files matching `/RegExp/i.test(filename)` regexp.
|
|
80
|
-
* `function` - Enable CSS Modules for files based on the filename satisfying your filter function check.
|
|
81
|
-
*/
|
|
82
|
-
auto?: boolean | RegExp | ((resourcePath: string) => boolean);
|
|
83
|
-
localIdentName?: string;
|
|
84
|
-
};
|
|
85
71
|
postcss?: PostCSSOptions | ((loaderContext: Rspack.LoaderContext) => PostCSSOptions);
|
|
86
72
|
lightningcss?: Rspack.LightningcssLoaderOptions;
|
|
87
73
|
less?: any;
|
|
@@ -100,6 +86,7 @@ export type UnpackConfig = {
|
|
|
100
86
|
server?: {
|
|
101
87
|
/**
|
|
102
88
|
* Expose hostname.
|
|
89
|
+
* @default false
|
|
103
90
|
*/
|
|
104
91
|
host?: boolean;
|
|
105
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,YAAY,EAAE,MAAM,EAAE,CAAA;AAEtB,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,aAAa,CAAA;AAEvD,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE9D,KAAK,cAAc,GAAG,cAAc,GAAG;IACrC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;CAC3B,CAAA;AAED,KAAK,aAAa,GACd,oBAAoB,GACpB,CAAC,CACC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE;IACP,WAAW,EAAE,CAAC,GAAG,OAAO,EAAE,oBAAoB,EAAE,KAAK,oBAAoB,CAAA;CAC1E,KACE,OAAO,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC,CAAA;AAE9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,OAAO,GACP;YACE,cAAc,CAAC,EAAE,MAAM,CAAA;YACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;SAC7B,CAAA;KACN,CAAA;IACD,WAAW,CAAC,EAAE;QACZ;;WAEG;QACH,GAAG,CAAC,EAAE,OAAO,CAAA;KACd,CAAA;IACD;;OAEG;IACH,GAAG,CAAC,EACA,OAAO,GACP;QACE;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;QACvB;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACL;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA"}
|
|
@@ -16,7 +16,10 @@ export type UnpackPlugin = {
|
|
|
16
16
|
unpackConfig: UnpackConfig;
|
|
17
17
|
mergeConfig: (...configs: BundlerConfiguration[]) => BundlerConfiguration;
|
|
18
18
|
}) => Promise<BundlerConfiguration> | BundlerConfiguration;
|
|
19
|
-
transform?:
|
|
19
|
+
transform?: {
|
|
20
|
+
filter: Pick<Rspack.RuleSetRule, 'test' | 'include' | 'exclude'>;
|
|
21
|
+
handler: (code: string, id: string) => Promise<string | null> | string | null;
|
|
22
|
+
};
|
|
20
23
|
transformHtml?: (html: string) => Promise<string> | string;
|
|
21
24
|
setupMiddlewares?: (middlewares: DevServerMiddleware[]) => Promise<DevServerMiddleware[]> | DevServerMiddleware[];
|
|
22
25
|
buildStart?: (context: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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AAE;QACV,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAA;QAChE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;KAC9E,CAAA;IACD,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAC1D,gBAAgB,CAAC,EAAE,CACjB,WAAW,EAAE,mBAAmB,EAAE,KAC/B,OAAO,CAAC,mBAAmB,EAAE,CAAC,GAAG,mBAAmB,EAAE,CAAA;IAC3D,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE;QACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;QACzB,cAAc,EAAE,OAAO,CAAA;QACvB,OAAO,EAAE,OAAO,CAAA;KACjB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;QACzB,cAAc,EAAE,OAAO,CAAA;QACvB,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAA;KACpB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAC3B,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,CAAA"}
|
package/dist-types/utils.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ type AddressUrl = {
|
|
|
34
34
|
export declare const getAddressUrls: ({ protocol, port, host, base, }: {
|
|
35
35
|
protocol?: string;
|
|
36
36
|
port: number;
|
|
37
|
-
host
|
|
38
|
-
base
|
|
37
|
+
host: boolean;
|
|
38
|
+
base: string;
|
|
39
39
|
}) => AddressUrl[];
|
|
40
40
|
export declare const trackPerformance: (msg?: string) => void;
|
|
41
41
|
/**
|
|
@@ -48,10 +48,6 @@ export declare const clearLine: () => void;
|
|
|
48
48
|
export declare const logUpdate: (output: string) => void;
|
|
49
49
|
export declare const isDebug: () => boolean;
|
|
50
50
|
export declare function isNodeVersionAtLeast(major: number, minor: number): boolean;
|
|
51
|
-
export declare const isCSSModules: ({ resourcePath, modules, }: {
|
|
52
|
-
resourcePath: string;
|
|
53
|
-
modules: NonNullable<UnpackConfig["css"]>["modules"];
|
|
54
|
-
}) => boolean;
|
|
55
51
|
export declare const esVersionToBrowserslist: (esVersion: Target) => string[];
|
|
56
52
|
export type LimitFunction = {
|
|
57
53
|
<T, Args extends any[]>(fn: (...args: Args) => Promise<T> | T, ...args: Args): Promise<T>;
|
|
@@ -67,8 +63,8 @@ export declare function pLimit(concurrency?: number): LimitFunction;
|
|
|
67
63
|
export declare const pathToExportIdentifier: (path: string) => string;
|
|
68
64
|
export declare function printServerUrls({ port, host, base, }: {
|
|
69
65
|
port: number;
|
|
70
|
-
host
|
|
71
|
-
base
|
|
66
|
+
host: boolean;
|
|
67
|
+
base: string;
|
|
72
68
|
}): void;
|
|
73
69
|
export declare function getHtmlTemplateOrContent(rawTemplate: NonNullable<UnpackConfig['html']>['template'], root: string): {
|
|
74
70
|
template: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAA;AAKxB,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE7E,eAAO,MAAe,WAAW,KAAsC,CAAA;AAEvE,eAAO,MAAiB,YAAY,KAA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KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAI1E;AAED,eAAO,MAAM,uBAAuB,GAAI,WAAW,MAAM,KAAG,MAAM,EAcjE,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,CAAC,EAAE,IAAI,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,WAAW,GAAE,MAA0C,GAAG,aAAa,CAmE7F;AAED,eAAO,MAAM,sBAAsB,GAAI,MAAM,MAAM,KAAG,MAYrD,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb,QAgBA;AAED,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,EAC1D,IAAI,EAAE,MAAM;;;EAkBb;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,WAExD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpackjs/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "An Rspack-based build tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
39
|
-
"@rsdoctor/rspack-plugin": "1.
|
|
40
|
-
"@rspack/core": "1.7.
|
|
39
|
+
"@rsdoctor/rspack-plugin": "1.5.0",
|
|
40
|
+
"@rspack/core": "1.7.2",
|
|
41
41
|
"@rspack/dev-server": "1.1.5",
|
|
42
42
|
"chokidar": "5.0.0",
|
|
43
43
|
"dotenv-expand": "12.0.3",
|
|
44
44
|
"jiti": "2.6.1",
|
|
45
|
-
"oxc-minify": "0.
|
|
45
|
+
"oxc-minify": "0.108.0",
|
|
46
46
|
"portfinder": "1.0.38",
|
|
47
47
|
"postcss": "8.5.6",
|
|
48
48
|
"stacktrace-parser": "0.1.11",
|