@unpackjs/core 3.5.1 → 3.5.3
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 +33 -84
- package/dist/index.js +32 -83
- package/dist-types/bundler-config/{bundleAnalyze.d.ts → buildAnalyze.d.ts} +2 -2
- package/dist-types/bundler-config/buildAnalyze.d.ts.map +1 -0
- package/dist-types/bundler-config/experimentCss.d.ts.map +1 -1
- package/dist-types/bundler-config/plugins/jsMinify.d.ts.map +1 -1
- package/dist-types/types/config.d.ts +1 -2
- package/dist-types/types/config.d.ts.map +1 -1
- package/dist-types/types/oxc.d.ts +1 -1
- package/dist-types/types/oxc.d.ts.map +1 -1
- package/package.json +4 -5
- package/compiled/webpack-bundle-analyzer/index.d.ts +0 -1
- package/compiled/webpack-bundle-analyzer/index.js +0 -23
- package/compiled/webpack-bundle-analyzer/license +0 -20
- package/compiled/webpack-bundle-analyzer/package.json +0 -1
- package/compiled/webpack-bundle-analyzer/public/viewer.js +0 -16
- package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +0 -10
- package/dist-types/bundler-config/bundleAnalyze.d.ts.map +0 -1
- package/dist-types/bundler-config/plugins/typedCssModules.d.ts +0 -15
- package/dist-types/bundler-config/plugins/typedCssModules.d.ts.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
6027: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(2437);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(2016).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
2437: (__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__(5575));
|
|
18
|
+
var _plugins = __nccwpck_require__(9130);
|
|
19
|
+
var _utils = __nccwpck_require__(2016);
|
|
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
|
+
9130: (__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__(3609),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(5328),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(9223));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
5328: (__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__(2016);
|
|
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
|
+
3609: (__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__(2016);
|
|
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
|
+
9223: (__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__(2016);
|
|
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
|
+
2016: (__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
|
+
5575: (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__(6027);
|
|
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
|
+
439: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(505)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
505: (__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__(363));
|
|
13
|
+
var _utils = __nccwpck_require__(412);
|
|
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
|
+
412: (__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
|
+
363: (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__(439);
|
|
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
|
+
7606: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5323
5323
|
"use strict";
|
|
5324
|
-
module.exports = __nccwpck_require__(
|
|
5324
|
+
module.exports = __nccwpck_require__(524)["default"];
|
|
5325
5325
|
},
|
|
5326
|
-
|
|
5326
|
+
524: (__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__(9184));
|
|
5334
|
+
var _utils = __nccwpck_require__(8613);
|
|
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
|
+
8613: (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
|
+
9184: (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__(7606);
|
|
6734
6734
|
module.exports = __webpack_exports__;
|
|
6735
6735
|
})();
|
|
@@ -4795,19 +4795,19 @@
|
|
|
4795
4795
|
}
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
4798
|
-
|
|
4798
|
+
615: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4799
4799
|
"use strict";
|
|
4800
|
-
const loader = __nccwpck_require__(
|
|
4800
|
+
const loader = __nccwpck_require__(377);
|
|
4801
4801
|
module.exports = loader.default;
|
|
4802
4802
|
},
|
|
4803
|
-
|
|
4803
|
+
377: (__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__(740);
|
|
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
|
+
740: (__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__(615);
|
|
5602
5602
|
module.exports = __webpack_exports__;
|
|
5603
5603
|
})();
|
package/dist/index.cjs
CHANGED
|
@@ -500,7 +500,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
500
500
|
'open'
|
|
501
501
|
], cliOptions.open), cliOptions?.analyze && setValueByPath(configExport, [
|
|
502
502
|
'performance',
|
|
503
|
-
'
|
|
503
|
+
'buildAnalyze'
|
|
504
504
|
], cliOptions.analyze), cliOptions?.root && setValueByPath(configExport, [
|
|
505
505
|
'root'
|
|
506
506
|
], root), cliOptions?.host && setValueByPath(configExport, [
|
|
@@ -565,11 +565,9 @@ for(var __webpack_i__ in (()=>{
|
|
|
565
565
|
plugin[hook] && pluginMap.set(plugin.name, plugin);
|
|
566
566
|
}), Array.from(pluginMap.values());
|
|
567
567
|
}
|
|
568
|
-
async function
|
|
569
|
-
let {
|
|
570
|
-
return config.plugins?.push(new
|
|
571
|
-
analyzerPort: 'auto'
|
|
572
|
-
})), config;
|
|
568
|
+
async function applyBuildAnalyzeConfig({ config }) {
|
|
569
|
+
let { RsdoctorRspackPlugin } = await import("@rsdoctor/rspack-plugin");
|
|
570
|
+
return config.plugins?.push(new RsdoctorRspackPlugin()), config;
|
|
573
571
|
}
|
|
574
572
|
async function getBuildDependencies(root, userBuildDependencies, envFilePaths) {
|
|
575
573
|
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 = {};
|
|
@@ -715,8 +713,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
715
713
|
let getOutputFilename = ({ type, hash, async })=>{
|
|
716
714
|
let FILENAME = isProd() && !1 !== hash ? PROD_DEFAULT_FILENAME : DEV_DEFAULT_FILENAME;
|
|
717
715
|
return async ? 'js' === type ? FILENAME.jsAsync : FILENAME.cssAsync : FILENAME[type];
|
|
718
|
-
}
|
|
719
|
-
var external_typed_css_modules_default = __webpack_require__.n(external_typed_css_modules_namespaceObject);
|
|
716
|
+
};
|
|
720
717
|
function _define_property(obj, key, value) {
|
|
721
718
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
722
719
|
value: value,
|
|
@@ -725,63 +722,12 @@ for(var __webpack_i__ in (()=>{
|
|
|
725
722
|
writable: !0
|
|
726
723
|
}) : obj[key] = value, obj;
|
|
727
724
|
}
|
|
728
|
-
let statPromise = external_node_fs_default().promises.stat, DtsCreator = external_typed_css_modules_default().default || external_typed_css_modules_default();
|
|
729
|
-
async function writeFile(dtsCreator, cssFile) {
|
|
730
|
-
let content = await dtsCreator.create(cssFile, void 0, !0);
|
|
731
|
-
await content.writeFile((definition)=>`// Generated automatically, do not edit\n${definition}`);
|
|
732
|
-
}
|
|
733
|
-
async function generateTypingIfNecessary(dtsCreator, cssFile) {
|
|
734
|
-
let typingStat;
|
|
735
|
-
try {
|
|
736
|
-
typingStat = await statPromise(`${cssFile}.d.ts`);
|
|
737
|
-
} catch {
|
|
738
|
-
return writeFile(dtsCreator, cssFile);
|
|
739
|
-
}
|
|
740
|
-
if ((await statPromise(cssFile)).mtime.getTime() > typingStat.mtime.getTime()) return writeFile(dtsCreator, cssFile);
|
|
741
|
-
}
|
|
742
|
-
let typedCssModules_PLUGIN_NAME = 'TypedCssModulesPlugin';
|
|
743
|
-
class TypedCssModulesPlugin {
|
|
744
|
-
apply(compiler) {
|
|
745
|
-
compiler.hooks.run.tapPromise(typedCssModules_PLUGIN_NAME, async ()=>{
|
|
746
|
-
await this.generateCssTypings(this.useIncremental);
|
|
747
|
-
}), compiler.hooks.watchRun.tap(typedCssModules_PLUGIN_NAME, ()=>{
|
|
748
|
-
setTimeout(()=>{
|
|
749
|
-
this.generateCssTypings(this.useIncremental).catch((err)=>{
|
|
750
|
-
logger_logger.error(err.toString());
|
|
751
|
-
}).finally(()=>{
|
|
752
|
-
this.useIncremental = !0;
|
|
753
|
-
});
|
|
754
|
-
}, 100);
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
async generateCssTypings(incremental) {
|
|
758
|
-
let cssModulesFiles = (await (0, external_tinyglobby_namespaceObject.glob)(this.globPattern)).filter((file)=>isCSSModules({
|
|
759
|
-
resourcePath: file,
|
|
760
|
-
modules: this.userOptions?.modules
|
|
761
|
-
})), doTask = incremental ? generateTypingIfNecessary : writeFile;
|
|
762
|
-
return Promise.all(cssModulesFiles.map((file)=>doTask(this.dtsCreator, file)));
|
|
763
|
-
}
|
|
764
|
-
constructor(options){
|
|
765
|
-
_define_property(this, "dtsCreator", void 0), _define_property(this, "useIncremental", !1), _define_property(this, "globPattern", 'src/**/*.{css,less,scss}'), _define_property(this, "userOptions", void 0), this.userOptions = options, this.dtsCreator = new DtsCreator({
|
|
766
|
-
camelCase: !0,
|
|
767
|
-
namedExports: !1
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
function jsMinify_define_property(obj, key, value) {
|
|
772
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
773
|
-
value: value,
|
|
774
|
-
enumerable: !0,
|
|
775
|
-
configurable: !0,
|
|
776
|
-
writable: !0
|
|
777
|
-
}) : obj[key] = value, obj;
|
|
778
|
-
}
|
|
779
725
|
let { RawSource, SourceMapSource } = core_namespaceObject.rspack.sources, isJsFile = /\.[cm]?js(\?.*)?$/i, jsMinify_PLUGIN_NAME = 'JsMinifyPlugin';
|
|
780
726
|
class JsMinifyPlugin {
|
|
781
727
|
apply(compiler) {
|
|
782
728
|
let meta = JSON.stringify({
|
|
783
729
|
name: jsMinify_PLUGIN_NAME,
|
|
784
|
-
version: "3.5.
|
|
730
|
+
version: "3.5.3",
|
|
785
731
|
options: this.minifyOptions
|
|
786
732
|
});
|
|
787
733
|
compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
|
|
@@ -794,26 +740,31 @@ for(var __webpack_i__ in (()=>{
|
|
|
794
740
|
});
|
|
795
741
|
}
|
|
796
742
|
async transformAssets(compilation) {
|
|
797
|
-
let { options: { devtool } } = compilation.compiler, sourceMap = 'string' == typeof devtool && devtool.includes('source-map'), assets = compilation.getAssets().filter((asset)=>!asset.info.minimized && isJsFile.test(asset.name)), minifyFn = this.customMinify ?? (await import("oxc-minify")).
|
|
798
|
-
assets.
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
743
|
+
let { options: { devtool } } = compilation.compiler, sourceMap = 'string' == typeof devtool && devtool.includes('source-map'), assets = compilation.getAssets().filter((asset)=>!asset.info.minimized && isJsFile.test(asset.name)), minifyFn = this.customMinify ?? (await import("oxc-minify")).minify;
|
|
744
|
+
await Promise.all(assets.map(async (asset)=>{
|
|
745
|
+
try {
|
|
746
|
+
let { source, map } = asset.source.sourceAndMap(), { name } = asset, inputCode = Buffer.isBuffer(source) ? source.toString() : source, output = await minifyFn(name, inputCode, {
|
|
747
|
+
sourcemap: sourceMap,
|
|
748
|
+
...this.minifyOptions
|
|
749
|
+
}), newMap = null;
|
|
750
|
+
output.map && ((newMap = 'string' == typeof output.map ? JSON.parse(output.map) : output.map).sources && 0 !== newMap.sources.length || (newMap.sources = [
|
|
751
|
+
asset.name
|
|
752
|
+
]));
|
|
753
|
+
let newSource = sourceMap && newMap ? new SourceMapSource(output.code, asset.name, newMap, inputCode, map ?? void 0, !0) : new RawSource(output.code), newInfo = {
|
|
754
|
+
...asset.info,
|
|
755
|
+
minimized: !0
|
|
756
|
+
};
|
|
757
|
+
compilation.updateAsset(asset.name, newSource, newInfo);
|
|
758
|
+
} catch (error) {
|
|
759
|
+
let err = Error(`[${jsMinify_PLUGIN_NAME}] Failed to minify ${asset.name}: ${error.message}`);
|
|
760
|
+
err.stack = error.stack, compilation.errors.push(err);
|
|
761
|
+
}
|
|
762
|
+
}));
|
|
812
763
|
}
|
|
813
764
|
constructor(options = {}){
|
|
814
|
-
|
|
765
|
+
_define_property(this, "minifyOptions", void 0), _define_property(this, "customMinify", void 0);
|
|
815
766
|
const { implementation, ...minifyOptions } = options;
|
|
816
|
-
this.customMinify = implementation?.
|
|
767
|
+
this.customMinify = implementation?.minify, this.minifyOptions = minifyOptions;
|
|
817
768
|
}
|
|
818
769
|
}
|
|
819
770
|
function loadingAnimation_define_property(obj, key, value) {
|
|
@@ -1406,9 +1357,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1406
1357
|
type: 'css'
|
|
1407
1358
|
}
|
|
1408
1359
|
].filter(Boolean)
|
|
1409
|
-
}),
|
|
1410
|
-
modules
|
|
1411
|
-
})), config;
|
|
1360
|
+
}), config;
|
|
1412
1361
|
}({
|
|
1413
1362
|
config,
|
|
1414
1363
|
unpackConfig
|
|
@@ -1533,7 +1482,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1533
1482
|
config,
|
|
1534
1483
|
unpackConfig,
|
|
1535
1484
|
envFilePaths
|
|
1536
|
-
})), unpackConfig.performance?.
|
|
1485
|
+
})), unpackConfig.performance?.buildAnalyze && isProd() && (config = await applyBuildAnalyzeConfig({
|
|
1537
1486
|
config
|
|
1538
1487
|
})), unpackConfig.typeCheck && isDev() && isTs && (config = await applyTypeCheckConfig({
|
|
1539
1488
|
config,
|
|
@@ -1922,7 +1871,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1922
1871
|
req.headers.accept?.includes('html') && (req.url = '/index.html'), next();
|
|
1923
1872
|
}), middlewares.unshift(core_namespaceObject.experiments.lazyCompilationMiddleware(compiler)), middlewares);
|
|
1924
1873
|
let server = new dev_server_namespaceObject.RspackDevServer(devServerOptions, compiler);
|
|
1925
|
-
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.5.
|
|
1874
|
+
await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.5.3`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ${colors.dim('ms')}\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
|
|
1926
1875
|
let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}`;
|
|
1927
1876
|
open && openBrowser(url), setupCliShortcuts({
|
|
1928
1877
|
openPage: async ()=>{
|
|
@@ -1995,7 +1944,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
1995
1944
|
...mergeConfig(defaultConfig, config),
|
|
1996
1945
|
_context: {
|
|
1997
1946
|
callerName,
|
|
1998
|
-
version: "3.5.
|
|
1947
|
+
version: "3.5.3"
|
|
1999
1948
|
}
|
|
2000
1949
|
};
|
|
2001
1950
|
};
|
|
@@ -2003,7 +1952,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2003
1952
|
build: async ({ watch } = {})=>{
|
|
2004
1953
|
setNodeEnv(watch ? 'development' : 'production');
|
|
2005
1954
|
let config = resolveConfig();
|
|
2006
|
-
console.log(colors.brand(`${callerName} v3.5.
|
|
1955
|
+
console.log(colors.brand(`${callerName} v3.5.3`), colors.cyan(`building for ${getNodeEnv()}...`)), await unpackBuild(config);
|
|
2007
1956
|
},
|
|
2008
1957
|
dev: async ()=>{
|
|
2009
1958
|
global.__unpack_start_time = performance.now(), setNodeEnv('development'), setDevServer(!0);
|