@rsbuild/core 1.0.2 → 1.0.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/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +8 -8
- package/compiled/rspack-chain/index.d.ts +1 -0
- package/compiled/rspack-chain/index.js +67 -66
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/index.cjs +38 -32
- package/dist/index.js +38 -32
- package/dist-types/constants.d.ts +1 -1
- package/dist-types/types/config.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
5457: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(4542);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(1542).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
4542: (__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__(9961));
|
|
15
15
|
var _package = _interopRequireDefault(__nccwpck_require__(6441));
|
|
16
16
|
var _semver = __nccwpck_require__(938);
|
|
17
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
18
|
-
var _plugins = __nccwpck_require__(
|
|
19
|
-
var _utils = __nccwpck_require__(
|
|
17
|
+
var _options = _interopRequireDefault(__nccwpck_require__(6509));
|
|
18
|
+
var _plugins = __nccwpck_require__(4871);
|
|
19
|
+
var _utils = __nccwpck_require__(1542);
|
|
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
|
+
4871: (__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__(5546),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(1156),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(5299));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
1156: (__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__(7718);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(1542);
|
|
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
|
+
5546: (__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__(7555),
|
|
388
388
|
);
|
|
389
|
-
var _utils = __nccwpck_require__(
|
|
389
|
+
var _utils = __nccwpck_require__(1542);
|
|
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
|
+
5299: (__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__(7555),
|
|
700
700
|
);
|
|
701
|
-
var _utils = __nccwpck_require__(
|
|
701
|
+
var _utils = __nccwpck_require__(1542);
|
|
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
|
+
1542: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1045
1045
|
"use strict";
|
|
1046
1046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1047
1047
|
exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
|
|
@@ -7964,7 +7964,7 @@
|
|
|
7964
7964
|
"use strict";
|
|
7965
7965
|
module.exports = require("util");
|
|
7966
7966
|
},
|
|
7967
|
-
|
|
7967
|
+
6509: (module) => {
|
|
7968
7968
|
"use strict";
|
|
7969
7969
|
module.exports = JSON.parse(
|
|
7970
7970
|
'{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
|
|
@@ -7999,6 +7999,6 @@
|
|
|
7999
7999
|
}
|
|
8000
8000
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8001
8001
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8002
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8002
|
+
var __webpack_exports__ = __nccwpck_require__(5457);
|
|
8003
8003
|
module.exports = __webpack_exports__;
|
|
8004
8004
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
894: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(426);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
}
|
|
305
305
|
module.exports = { CachedChildCompilation };
|
|
306
306
|
},
|
|
307
|
-
|
|
307
|
+
426: (module) => {
|
|
308
308
|
"use strict";
|
|
309
309
|
class HtmlWebpackChildCompiler {
|
|
310
310
|
constructor(templates) {
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
}
|
|
474
474
|
module.exports = { HtmlWebpackChildCompiler };
|
|
475
475
|
},
|
|
476
|
-
|
|
476
|
+
955: (module) => {
|
|
477
477
|
"use strict";
|
|
478
478
|
module.exports = {};
|
|
479
479
|
module.exports.none = (chunks) => chunks;
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
};
|
|
493
493
|
module.exports.auto = module.exports.none;
|
|
494
494
|
},
|
|
495
|
-
|
|
495
|
+
265: (module) => {
|
|
496
496
|
"use strict";
|
|
497
497
|
module.exports = function (err) {
|
|
498
498
|
return {
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
};
|
|
514
514
|
};
|
|
515
515
|
},
|
|
516
|
-
|
|
516
|
+
411: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
517
517
|
"use strict";
|
|
518
518
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(348);
|
|
519
519
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
}
|
|
540
540
|
module.exports = { getHtmlRspackPluginHooks };
|
|
541
541
|
},
|
|
542
|
-
|
|
542
|
+
647: (module) => {
|
|
543
543
|
const voidTags = [
|
|
544
544
|
"area",
|
|
545
545
|
"base",
|
|
@@ -607,19 +607,19 @@
|
|
|
607
607
|
htmlTagObjectToString,
|
|
608
608
|
};
|
|
609
609
|
},
|
|
610
|
-
|
|
610
|
+
693: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
611
611
|
"use strict";
|
|
612
612
|
const promisify = __nccwpck_require__(837).promisify;
|
|
613
613
|
const vm = __nccwpck_require__(144);
|
|
614
614
|
const fs = __nccwpck_require__(147);
|
|
615
615
|
const path = __nccwpck_require__(17);
|
|
616
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
616
|
+
const { CachedChildCompilation } = __nccwpck_require__(894);
|
|
617
617
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
618
|
-
__nccwpck_require__(
|
|
619
|
-
const prettyError = __nccwpck_require__(
|
|
620
|
-
const chunkSorter = __nccwpck_require__(
|
|
618
|
+
__nccwpck_require__(647);
|
|
619
|
+
const prettyError = __nccwpck_require__(265);
|
|
620
|
+
const chunkSorter = __nccwpck_require__(955);
|
|
621
621
|
const getHtmlRspackPluginHooks =
|
|
622
|
-
__nccwpck_require__(
|
|
622
|
+
__nccwpck_require__(411).getHtmlRspackPluginHooks;
|
|
623
623
|
class HtmlRspackPlugin {
|
|
624
624
|
constructor(userOptions = {}) {
|
|
625
625
|
this.version = HtmlRspackPlugin.version;
|
|
@@ -1577,6 +1577,6 @@
|
|
|
1577
1577
|
}
|
|
1578
1578
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1579
1579
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1580
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1580
|
+
var __webpack_exports__ = __nccwpck_require__(693);
|
|
1581
1581
|
module.exports = __webpack_exports__;
|
|
1582
1582
|
})();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
709: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(354)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
354: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(17));
|
|
12
12
|
var _package = _interopRequireDefault(__nccwpck_require__(441));
|
|
13
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
14
|
-
var _utils = __nccwpck_require__(
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(754));
|
|
14
|
+
var _utils = __nccwpck_require__(522);
|
|
15
15
|
function _interopRequireDefault(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
17
17
|
}
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
callback(null, result.css, map, { ast });
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
|
-
|
|
192
|
+
522: (module, exports, __nccwpck_require__) => {
|
|
193
193
|
module = __nccwpck_require__.nmd(module);
|
|
194
194
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
195
195
|
exports.exec = exec;
|
|
@@ -694,7 +694,7 @@
|
|
|
694
694
|
310: (module) => {
|
|
695
695
|
module.exports = require("url");
|
|
696
696
|
},
|
|
697
|
-
|
|
697
|
+
754: (module) => {
|
|
698
698
|
module.exports = JSON.parse(
|
|
699
699
|
'{"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}',
|
|
700
700
|
);
|
|
@@ -739,6 +739,6 @@
|
|
|
739
739
|
})();
|
|
740
740
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
741
741
|
__nccwpck_require__.ab = __dirname + "/";
|
|
742
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
742
|
+
var __webpack_exports__ = __nccwpck_require__(709);
|
|
743
743
|
module.exports = __webpack_exports__;
|
|
744
744
|
})();
|
|
@@ -381,6 +381,7 @@ declare namespace Config {
|
|
|
381
381
|
preferAbsolute(value: RspackResolve['preferAbsolute']): this;
|
|
382
382
|
|
|
383
383
|
plugin(name: string): Plugin<this, ResolvePlugin>;
|
|
384
|
+
tsConfig(value: RspackResolve['tsConfig']): this;
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
class RuleResolve<T = Config> extends Resolve<T> {
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
};
|
|
628
628
|
exports.toString = toString;
|
|
629
629
|
},
|
|
630
|
-
|
|
630
|
+
432: (module) => {
|
|
631
631
|
module.exports = class extends Function {
|
|
632
632
|
constructor() {
|
|
633
633
|
super();
|
|
@@ -640,35 +640,35 @@
|
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
},
|
|
643
|
-
|
|
644
|
-
const createMap = __nccwpck_require__(
|
|
645
|
-
const createChainable = __nccwpck_require__(
|
|
643
|
+
684: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
644
|
+
const createMap = __nccwpck_require__(84);
|
|
645
|
+
const createChainable = __nccwpck_require__(537);
|
|
646
646
|
module.exports = createMap(createChainable(Object));
|
|
647
647
|
},
|
|
648
|
-
|
|
649
|
-
const createSet = __nccwpck_require__(
|
|
650
|
-
const createChainable = __nccwpck_require__(
|
|
648
|
+
740: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
649
|
+
const createSet = __nccwpck_require__(566);
|
|
650
|
+
const createChainable = __nccwpck_require__(537);
|
|
651
651
|
module.exports = createSet(createChainable(Object));
|
|
652
652
|
},
|
|
653
|
-
|
|
654
|
-
const Callable = __nccwpck_require__(
|
|
655
|
-
const createMap = __nccwpck_require__(
|
|
656
|
-
const createChainable = __nccwpck_require__(
|
|
657
|
-
const createValue = __nccwpck_require__(
|
|
653
|
+
792: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
654
|
+
const Callable = __nccwpck_require__(432);
|
|
655
|
+
const createMap = __nccwpck_require__(84);
|
|
656
|
+
const createChainable = __nccwpck_require__(537);
|
|
657
|
+
const createValue = __nccwpck_require__(908);
|
|
658
658
|
module.exports = createValue(createMap(createChainable(Callable)));
|
|
659
659
|
},
|
|
660
|
-
|
|
661
|
-
const ChainedMap = __nccwpck_require__(
|
|
662
|
-
const ChainedValueMap = __nccwpck_require__(
|
|
663
|
-
const ChainedSet = __nccwpck_require__(
|
|
664
|
-
const Resolve = __nccwpck_require__(
|
|
665
|
-
const ResolveLoader = __nccwpck_require__(
|
|
666
|
-
const Output = __nccwpck_require__(
|
|
667
|
-
const DevServer = __nccwpck_require__(
|
|
668
|
-
const Plugin = __nccwpck_require__(
|
|
669
|
-
const Module = __nccwpck_require__(
|
|
670
|
-
const Optimization = __nccwpck_require__(
|
|
671
|
-
const Performance = __nccwpck_require__(
|
|
660
|
+
173: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
661
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
662
|
+
const ChainedValueMap = __nccwpck_require__(792);
|
|
663
|
+
const ChainedSet = __nccwpck_require__(740);
|
|
664
|
+
const Resolve = __nccwpck_require__(894);
|
|
665
|
+
const ResolveLoader = __nccwpck_require__(799);
|
|
666
|
+
const Output = __nccwpck_require__(43);
|
|
667
|
+
const DevServer = __nccwpck_require__(692);
|
|
668
|
+
const Plugin = __nccwpck_require__(360);
|
|
669
|
+
const Module = __nccwpck_require__(310);
|
|
670
|
+
const Optimization = __nccwpck_require__(812);
|
|
671
|
+
const Performance = __nccwpck_require__(549);
|
|
672
672
|
module.exports = class extends ChainedMap {
|
|
673
673
|
constructor() {
|
|
674
674
|
super();
|
|
@@ -818,9 +818,9 @@
|
|
|
818
818
|
}
|
|
819
819
|
};
|
|
820
820
|
},
|
|
821
|
-
|
|
822
|
-
const ChainedMap = __nccwpck_require__(
|
|
823
|
-
const ChainedSet = __nccwpck_require__(
|
|
821
|
+
692: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
822
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
823
|
+
const ChainedSet = __nccwpck_require__(740);
|
|
824
824
|
module.exports = class extends ChainedMap {
|
|
825
825
|
constructor(parent) {
|
|
826
826
|
super(parent);
|
|
@@ -892,9 +892,9 @@
|
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
894
|
},
|
|
895
|
-
|
|
896
|
-
const ChainedMap = __nccwpck_require__(
|
|
897
|
-
const Rule = __nccwpck_require__(
|
|
895
|
+
310: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
896
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
897
|
+
const Rule = __nccwpck_require__(315);
|
|
898
898
|
module.exports = class extends ChainedMap {
|
|
899
899
|
constructor(parent) {
|
|
900
900
|
super(parent);
|
|
@@ -949,10 +949,10 @@
|
|
|
949
949
|
}
|
|
950
950
|
};
|
|
951
951
|
},
|
|
952
|
-
|
|
953
|
-
const ChainedMap = __nccwpck_require__(
|
|
954
|
-
const ChainedValueMap = __nccwpck_require__(
|
|
955
|
-
const Plugin = __nccwpck_require__(
|
|
952
|
+
812: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
953
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
954
|
+
const ChainedValueMap = __nccwpck_require__(792);
|
|
955
|
+
const Plugin = __nccwpck_require__(360);
|
|
956
956
|
module.exports = class extends ChainedMap {
|
|
957
957
|
constructor(parent) {
|
|
958
958
|
super(parent);
|
|
@@ -1013,7 +1013,7 @@
|
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
1015
|
},
|
|
1016
|
-
|
|
1016
|
+
201: (module) => {
|
|
1017
1017
|
module.exports = (Class) =>
|
|
1018
1018
|
class extends Class {
|
|
1019
1019
|
before(name) {
|
|
@@ -1045,8 +1045,8 @@
|
|
|
1045
1045
|
}
|
|
1046
1046
|
};
|
|
1047
1047
|
},
|
|
1048
|
-
|
|
1049
|
-
const ChainedMap = __nccwpck_require__(
|
|
1048
|
+
43: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1049
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
1050
1050
|
module.exports = class extends ChainedMap {
|
|
1051
1051
|
constructor(parent) {
|
|
1052
1052
|
super(parent);
|
|
@@ -1100,8 +1100,8 @@
|
|
|
1100
1100
|
}
|
|
1101
1101
|
};
|
|
1102
1102
|
},
|
|
1103
|
-
|
|
1104
|
-
const ChainedValueMap = __nccwpck_require__(
|
|
1103
|
+
549: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1104
|
+
const ChainedValueMap = __nccwpck_require__(792);
|
|
1105
1105
|
module.exports = class extends ChainedValueMap {
|
|
1106
1106
|
constructor(parent) {
|
|
1107
1107
|
super(parent);
|
|
@@ -1114,9 +1114,9 @@
|
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
1116
|
},
|
|
1117
|
-
|
|
1118
|
-
const ChainedMap = __nccwpck_require__(
|
|
1119
|
-
const Orderable = __nccwpck_require__(
|
|
1117
|
+
360: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1118
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
1119
|
+
const Orderable = __nccwpck_require__(201);
|
|
1120
1120
|
module.exports = Orderable(
|
|
1121
1121
|
class extends ChainedMap {
|
|
1122
1122
|
constructor(parent, name, type = "plugin") {
|
|
@@ -1170,7 +1170,7 @@
|
|
|
1170
1170
|
}
|
|
1171
1171
|
if (typeof plugin === "string") {
|
|
1172
1172
|
pluginPath = plugin;
|
|
1173
|
-
plugin = __nccwpck_require__(
|
|
1173
|
+
plugin = __nccwpck_require__(900)(pluginPath);
|
|
1174
1174
|
}
|
|
1175
1175
|
const constructorName = plugin.__expression
|
|
1176
1176
|
? `(${plugin.__expression})`
|
|
@@ -1188,10 +1188,10 @@
|
|
|
1188
1188
|
},
|
|
1189
1189
|
);
|
|
1190
1190
|
},
|
|
1191
|
-
|
|
1192
|
-
const ChainedMap = __nccwpck_require__(
|
|
1193
|
-
const ChainedSet = __nccwpck_require__(
|
|
1194
|
-
const Plugin = __nccwpck_require__(
|
|
1191
|
+
894: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1192
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
1193
|
+
const ChainedSet = __nccwpck_require__(740);
|
|
1194
|
+
const Plugin = __nccwpck_require__(360);
|
|
1195
1195
|
const childMaps = ["alias", "fallback", "byDependency"];
|
|
1196
1196
|
const childSets = [
|
|
1197
1197
|
"aliasFields",
|
|
@@ -1224,6 +1224,7 @@
|
|
|
1224
1224
|
"unsafeCache",
|
|
1225
1225
|
"preferRelative",
|
|
1226
1226
|
"preferAbsolute",
|
|
1227
|
+
"tsConfig",
|
|
1227
1228
|
]);
|
|
1228
1229
|
}
|
|
1229
1230
|
plugin(name) {
|
|
@@ -1269,9 +1270,9 @@
|
|
|
1269
1270
|
}
|
|
1270
1271
|
};
|
|
1271
1272
|
},
|
|
1272
|
-
|
|
1273
|
-
const Resolve = __nccwpck_require__(
|
|
1274
|
-
const ChainedSet = __nccwpck_require__(
|
|
1273
|
+
799: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1274
|
+
const Resolve = __nccwpck_require__(894);
|
|
1275
|
+
const ChainedSet = __nccwpck_require__(740);
|
|
1275
1276
|
module.exports = class extends Resolve {
|
|
1276
1277
|
constructor(parent) {
|
|
1277
1278
|
super(parent);
|
|
@@ -1298,12 +1299,12 @@
|
|
|
1298
1299
|
}
|
|
1299
1300
|
};
|
|
1300
1301
|
},
|
|
1301
|
-
|
|
1302
|
-
const ChainedMap = __nccwpck_require__(
|
|
1303
|
-
const ChainedSet = __nccwpck_require__(
|
|
1304
|
-
const Orderable = __nccwpck_require__(
|
|
1305
|
-
const Use = __nccwpck_require__(
|
|
1306
|
-
const Resolve = __nccwpck_require__(
|
|
1302
|
+
315: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1303
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
1304
|
+
const ChainedSet = __nccwpck_require__(740);
|
|
1305
|
+
const Orderable = __nccwpck_require__(201);
|
|
1306
|
+
const Use = __nccwpck_require__(735);
|
|
1307
|
+
const Resolve = __nccwpck_require__(894);
|
|
1307
1308
|
function toArray(arr) {
|
|
1308
1309
|
return Array.isArray(arr) ? arr : [arr];
|
|
1309
1310
|
}
|
|
@@ -1428,10 +1429,10 @@
|
|
|
1428
1429
|
);
|
|
1429
1430
|
module.exports = Rule;
|
|
1430
1431
|
},
|
|
1431
|
-
|
|
1432
|
+
735: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1432
1433
|
const merge = __nccwpck_require__(964);
|
|
1433
|
-
const ChainedMap = __nccwpck_require__(
|
|
1434
|
-
const Orderable = __nccwpck_require__(
|
|
1434
|
+
const ChainedMap = __nccwpck_require__(684);
|
|
1435
|
+
const Orderable = __nccwpck_require__(201);
|
|
1435
1436
|
module.exports = Orderable(
|
|
1436
1437
|
class extends ChainedMap {
|
|
1437
1438
|
constructor(parent, name) {
|
|
@@ -1464,7 +1465,7 @@
|
|
|
1464
1465
|
},
|
|
1465
1466
|
);
|
|
1466
1467
|
},
|
|
1467
|
-
|
|
1468
|
+
537: (module) => {
|
|
1468
1469
|
module.exports = function createChainable(superClass) {
|
|
1469
1470
|
return class extends superClass {
|
|
1470
1471
|
constructor(parent) {
|
|
@@ -1481,7 +1482,7 @@
|
|
|
1481
1482
|
};
|
|
1482
1483
|
};
|
|
1483
1484
|
},
|
|
1484
|
-
|
|
1485
|
+
84: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1485
1486
|
const merge = __nccwpck_require__(964);
|
|
1486
1487
|
module.exports = function createMap(superClass) {
|
|
1487
1488
|
return class extends superClass {
|
|
@@ -1605,7 +1606,7 @@
|
|
|
1605
1606
|
};
|
|
1606
1607
|
};
|
|
1607
1608
|
},
|
|
1608
|
-
|
|
1609
|
+
566: (module) => {
|
|
1609
1610
|
module.exports = function createSet(superClass) {
|
|
1610
1611
|
return class extends superClass {
|
|
1611
1612
|
constructor(...args) {
|
|
@@ -1655,7 +1656,7 @@
|
|
|
1655
1656
|
};
|
|
1656
1657
|
};
|
|
1657
1658
|
},
|
|
1658
|
-
|
|
1659
|
+
908: (module) => {
|
|
1659
1660
|
module.exports = function createValue(superClass) {
|
|
1660
1661
|
return class extends superClass {
|
|
1661
1662
|
constructor(...args) {
|
|
@@ -1693,7 +1694,7 @@
|
|
|
1693
1694
|
};
|
|
1694
1695
|
};
|
|
1695
1696
|
},
|
|
1696
|
-
|
|
1697
|
+
900: (module) => {
|
|
1697
1698
|
function webpackEmptyContext(req) {
|
|
1698
1699
|
var e = new Error("Cannot find module '" + req + "'");
|
|
1699
1700
|
e.code = "MODULE_NOT_FOUND";
|
|
@@ -1701,7 +1702,7 @@
|
|
|
1701
1702
|
}
|
|
1702
1703
|
webpackEmptyContext.keys = () => [];
|
|
1703
1704
|
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
1704
|
-
webpackEmptyContext.id =
|
|
1705
|
+
webpackEmptyContext.id = 900;
|
|
1705
1706
|
module.exports = webpackEmptyContext;
|
|
1706
1707
|
},
|
|
1707
1708
|
};
|
|
@@ -1731,6 +1732,6 @@
|
|
|
1731
1732
|
})();
|
|
1732
1733
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1733
1734
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1734
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1735
|
+
var __webpack_exports__ = __nccwpck_require__(173);
|
|
1735
1736
|
module.exports = __webpack_exports__;
|
|
1736
1737
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rspack-chain","author":"rspack-contrib","version":"1.0.
|
|
1
|
+
{"name":"rspack-chain","author":"rspack-contrib","version":"1.0.1","license":"MPL-2.0","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
525: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.transformFiles =
|
|
7
7
|
exports.reduceChunk =
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
.map(standardizeFilePaths);
|
|
121
121
|
exports.transformFiles = transformFiles;
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
950: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
124
124
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
125
125
|
exports.normalModuleLoaderHook =
|
|
126
126
|
exports.getCompilerHooks =
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
const fs_1 = __nccwpck_require__(147);
|
|
131
131
|
const path_1 = __nccwpck_require__(17);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(348);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(525);
|
|
134
134
|
const compilerHookMap = new WeakMap();
|
|
135
135
|
const getCompilerHooks = (compiler) => {
|
|
136
136
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
exports.getCompilerHooks =
|
|
313
313
|
void 0;
|
|
314
314
|
const path_1 = __nccwpck_require__(17);
|
|
315
|
-
const hooks_1 = __nccwpck_require__(
|
|
315
|
+
const hooks_1 = __nccwpck_require__(950);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/dist/index.cjs
CHANGED
|
@@ -148,7 +148,7 @@ var init_constants = __esm({
|
|
|
148
148
|
"use strict";
|
|
149
149
|
import_node_path = require("path");
|
|
150
150
|
ROOT_DIST_DIR = "dist";
|
|
151
|
-
HTML_DIST_DIR = "
|
|
151
|
+
HTML_DIST_DIR = "./";
|
|
152
152
|
JS_DIST_DIR = "static/js";
|
|
153
153
|
CSS_DIST_DIR = "static/css";
|
|
154
154
|
SVG_DIST_DIR = "static/svg";
|
|
@@ -1959,7 +1959,13 @@ function getHTMLPathByEntry(entryName, config) {
|
|
|
1959
1959
|
} else {
|
|
1960
1960
|
filename = `${entryName}/index.html`;
|
|
1961
1961
|
}
|
|
1962
|
-
|
|
1962
|
+
const prefix = config.output.distPath.html;
|
|
1963
|
+
if (prefix.startsWith("/")) {
|
|
1964
|
+
import_rslog.logger.warn(
|
|
1965
|
+
`Absolute path is not recommended at \`output.distPath.html\`: "${prefix}", please use relative path instead.`
|
|
1966
|
+
);
|
|
1967
|
+
}
|
|
1968
|
+
return removeLeadingSlash(import_node_path8.posix.join(prefix, filename));
|
|
1963
1969
|
}
|
|
1964
1970
|
function initPluginAPI({
|
|
1965
1971
|
context,
|
|
@@ -2154,6 +2160,7 @@ var init_initPlugins = __esm({
|
|
|
2154
2160
|
init_constants();
|
|
2155
2161
|
init_createContext();
|
|
2156
2162
|
init_helpers();
|
|
2163
|
+
init_logger();
|
|
2157
2164
|
init_pluginManager();
|
|
2158
2165
|
mapProcessAssetsStage = (compiler, stage) => {
|
|
2159
2166
|
const { Compilation } = compiler.webpack;
|
|
@@ -2297,7 +2304,7 @@ async function createContext(options, userConfig, bundlerType) {
|
|
|
2297
2304
|
const rsbuildConfig = await withDefaultConfig(rootPath, userConfig);
|
|
2298
2305
|
const cachePath = (0, import_node_path9.join)(rootPath, "node_modules", ".cache");
|
|
2299
2306
|
return {
|
|
2300
|
-
version: "1.0.
|
|
2307
|
+
version: "1.0.3",
|
|
2301
2308
|
rootPath,
|
|
2302
2309
|
distPath: "",
|
|
2303
2310
|
cachePath,
|
|
@@ -2926,7 +2933,13 @@ async function initRsbuildConfig({
|
|
|
2926
2933
|
context.specifiedEnvironments
|
|
2927
2934
|
);
|
|
2928
2935
|
const {
|
|
2929
|
-
dev: {
|
|
2936
|
+
dev: {
|
|
2937
|
+
hmr,
|
|
2938
|
+
assetPrefix,
|
|
2939
|
+
progressBar,
|
|
2940
|
+
lazyCompilation,
|
|
2941
|
+
...rsbuildSharedDev
|
|
2942
|
+
},
|
|
2930
2943
|
server
|
|
2931
2944
|
} = normalizeBaseConfig;
|
|
2932
2945
|
for (const [name, config] of Object.entries(mergedEnvironments)) {
|
|
@@ -3015,7 +3028,6 @@ var init_initConfigs = __esm({
|
|
|
3015
3028
|
return defaultEntry;
|
|
3016
3029
|
};
|
|
3017
3030
|
const { environments, dev, server, provider, ...rsbuildSharedConfig } = normalizedConfig;
|
|
3018
|
-
const { assetPrefix, lazyCompilation } = dev;
|
|
3019
3031
|
const isEnvironmentEnabled = (name) => !specifiedEnvironments || specifiedEnvironments.includes(name);
|
|
3020
3032
|
const applyEnvironmentDefaultConfig = (config) => {
|
|
3021
3033
|
if (!config.source.entry || Object.keys(config.source.entry).length === 0) {
|
|
@@ -3034,10 +3046,12 @@ var init_initConfigs = __esm({
|
|
|
3034
3046
|
...mergeRsbuildConfig(
|
|
3035
3047
|
{
|
|
3036
3048
|
...rsbuildSharedConfig,
|
|
3037
|
-
dev:
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3049
|
+
dev: pick(dev, [
|
|
3050
|
+
"hmr",
|
|
3051
|
+
"assetPrefix",
|
|
3052
|
+
"progressBar",
|
|
3053
|
+
"lazyCompilation"
|
|
3054
|
+
])
|
|
3041
3055
|
},
|
|
3042
3056
|
config
|
|
3043
3057
|
)
|
|
@@ -3061,10 +3075,7 @@ var init_initConfigs = __esm({
|
|
|
3061
3075
|
return {
|
|
3062
3076
|
[defaultEnvironmentName]: applyEnvironmentDefaultConfig({
|
|
3063
3077
|
...rsbuildSharedConfig,
|
|
3064
|
-
dev:
|
|
3065
|
-
assetPrefix,
|
|
3066
|
-
lazyCompilation
|
|
3067
|
-
}
|
|
3078
|
+
dev: pick(dev, ["hmr", "assetPrefix", "progressBar", "lazyCompilation"])
|
|
3068
3079
|
})
|
|
3069
3080
|
};
|
|
3070
3081
|
};
|
|
@@ -5133,7 +5144,9 @@ var init_build = __esm({
|
|
|
5133
5144
|
});
|
|
5134
5145
|
return {
|
|
5135
5146
|
close: () => new Promise((resolve2) => {
|
|
5136
|
-
watching.close(
|
|
5147
|
+
watching.close(() => {
|
|
5148
|
+
resolve2();
|
|
5149
|
+
});
|
|
5137
5150
|
})
|
|
5138
5151
|
};
|
|
5139
5152
|
}
|
|
@@ -5259,7 +5272,7 @@ var init_basic2 = __esm({
|
|
|
5259
5272
|
name: "rsbuild:basic",
|
|
5260
5273
|
setup(api) {
|
|
5261
5274
|
api.modifyBundlerChain(
|
|
5262
|
-
(chain, { env,
|
|
5275
|
+
(chain, { env, isDev, target, bundler, environment, CHAIN_ID: CHAIN_ID2 }) => {
|
|
5263
5276
|
const { config } = environment;
|
|
5264
5277
|
chain.name(environment.name);
|
|
5265
5278
|
chain.devtool(getJsSourceMap(config));
|
|
@@ -5277,7 +5290,7 @@ var init_basic2 = __esm({
|
|
|
5277
5290
|
exportsPresence: "error"
|
|
5278
5291
|
}
|
|
5279
5292
|
});
|
|
5280
|
-
const usingHMR =
|
|
5293
|
+
const usingHMR = isDev && config.dev.hmr && target === "web";
|
|
5281
5294
|
if (usingHMR) {
|
|
5282
5295
|
chain.plugin(CHAIN_ID2.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin);
|
|
5283
5296
|
}
|
|
@@ -6079,7 +6092,7 @@ var init_resolve = __esm({
|
|
|
6079
6092
|
api.modifyBundlerChain({
|
|
6080
6093
|
order: "pre",
|
|
6081
6094
|
handler: (chain, { environment, CHAIN_ID: CHAIN_ID2 }) => {
|
|
6082
|
-
const { config } = environment;
|
|
6095
|
+
const { config, tsconfigPath } = environment;
|
|
6083
6096
|
applyExtensions({ chain });
|
|
6084
6097
|
applyAlias({
|
|
6085
6098
|
chain,
|
|
@@ -6087,19 +6100,12 @@ var init_resolve = __esm({
|
|
|
6087
6100
|
rootPath: api.context.rootPath
|
|
6088
6101
|
});
|
|
6089
6102
|
applyFullySpecified({ chain, config, CHAIN_ID: CHAIN_ID2 });
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
rspackConfig.resolve ||= {};
|
|
6096
|
-
if (typeof rspackConfig.resolve.tsConfig === "string") {
|
|
6097
|
-
return;
|
|
6103
|
+
if (tsconfigPath && // Only Rspack has the tsConfig option
|
|
6104
|
+
api.context.bundlerType === "rspack" && config.source.aliasStrategy === "prefer-tsconfig") {
|
|
6105
|
+
chain.resolve.tsConfig({
|
|
6106
|
+
configFile: tsconfigPath
|
|
6107
|
+
});
|
|
6098
6108
|
}
|
|
6099
|
-
rspackConfig.resolve.tsConfig = {
|
|
6100
|
-
configFile: tsconfigPath,
|
|
6101
|
-
...rspackConfig.resolve.tsConfig
|
|
6102
|
-
};
|
|
6103
6109
|
}
|
|
6104
6110
|
});
|
|
6105
6111
|
}
|
|
@@ -9669,7 +9675,7 @@ var init_init = __esm({
|
|
|
9669
9675
|
|
|
9670
9676
|
// src/cli/commands.ts
|
|
9671
9677
|
function runCli() {
|
|
9672
|
-
import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.
|
|
9678
|
+
import_commander.program.name("rsbuild").usage("<command> [options]").version("1.0.3");
|
|
9673
9679
|
const devCommand = import_commander.program.command("dev");
|
|
9674
9680
|
const buildCommand = import_commander.program.command("build");
|
|
9675
9681
|
const previewCommand = import_commander.program.command("preview");
|
|
@@ -9792,7 +9798,7 @@ function prepareCli() {
|
|
|
9792
9798
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
9793
9799
|
console.log();
|
|
9794
9800
|
}
|
|
9795
|
-
import_rslog.logger.greet(` ${`Rsbuild v${"1.0.
|
|
9801
|
+
import_rslog.logger.greet(` ${`Rsbuild v${"1.0.3"}`}
|
|
9796
9802
|
`);
|
|
9797
9803
|
}
|
|
9798
9804
|
var init_prepare = __esm({
|
|
@@ -9876,7 +9882,7 @@ init_logger();
|
|
|
9876
9882
|
init_mergeConfig();
|
|
9877
9883
|
init_helpers();
|
|
9878
9884
|
init_constants();
|
|
9879
|
-
var version = "1.0.
|
|
9885
|
+
var version = "1.0.3";
|
|
9880
9886
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9881
9887
|
0 && (module.exports = {
|
|
9882
9888
|
PLUGIN_CSS_NAME,
|
package/dist/index.js
CHANGED
|
@@ -172,7 +172,7 @@ var init_constants = __esm({
|
|
|
172
172
|
"use strict";
|
|
173
173
|
init_esm();
|
|
174
174
|
ROOT_DIST_DIR = "dist";
|
|
175
|
-
HTML_DIST_DIR = "
|
|
175
|
+
HTML_DIST_DIR = "./";
|
|
176
176
|
JS_DIST_DIR = "static/js";
|
|
177
177
|
CSS_DIST_DIR = "static/css";
|
|
178
178
|
SVG_DIST_DIR = "static/svg";
|
|
@@ -1995,7 +1995,13 @@ function getHTMLPathByEntry(entryName, config) {
|
|
|
1995
1995
|
} else {
|
|
1996
1996
|
filename = `${entryName}/index.html`;
|
|
1997
1997
|
}
|
|
1998
|
-
|
|
1998
|
+
const prefix = config.output.distPath.html;
|
|
1999
|
+
if (prefix.startsWith("/")) {
|
|
2000
|
+
logger.warn(
|
|
2001
|
+
`Absolute path is not recommended at \`output.distPath.html\`: "${prefix}", please use relative path instead.`
|
|
2002
|
+
);
|
|
2003
|
+
}
|
|
2004
|
+
return removeLeadingSlash(posix2.join(prefix, filename));
|
|
1999
2005
|
}
|
|
2000
2006
|
function initPluginAPI({
|
|
2001
2007
|
context,
|
|
@@ -2190,6 +2196,7 @@ var init_initPlugins = __esm({
|
|
|
2190
2196
|
init_constants();
|
|
2191
2197
|
init_createContext();
|
|
2192
2198
|
init_helpers();
|
|
2199
|
+
init_logger();
|
|
2193
2200
|
init_pluginManager();
|
|
2194
2201
|
mapProcessAssetsStage = (compiler, stage) => {
|
|
2195
2202
|
const { Compilation } = compiler.webpack;
|
|
@@ -2335,7 +2342,7 @@ async function createContext(options, userConfig, bundlerType) {
|
|
|
2335
2342
|
const rsbuildConfig = await withDefaultConfig(rootPath, userConfig);
|
|
2336
2343
|
const cachePath = join6(rootPath, "node_modules", ".cache");
|
|
2337
2344
|
return {
|
|
2338
|
-
version: "1.0.
|
|
2345
|
+
version: "1.0.3",
|
|
2339
2346
|
rootPath,
|
|
2340
2347
|
distPath: "",
|
|
2341
2348
|
cachePath,
|
|
@@ -2968,7 +2975,13 @@ async function initRsbuildConfig({
|
|
|
2968
2975
|
context.specifiedEnvironments
|
|
2969
2976
|
);
|
|
2970
2977
|
const {
|
|
2971
|
-
dev: {
|
|
2978
|
+
dev: {
|
|
2979
|
+
hmr,
|
|
2980
|
+
assetPrefix,
|
|
2981
|
+
progressBar,
|
|
2982
|
+
lazyCompilation,
|
|
2983
|
+
...rsbuildSharedDev
|
|
2984
|
+
},
|
|
2972
2985
|
server
|
|
2973
2986
|
} = normalizeBaseConfig;
|
|
2974
2987
|
for (const [name, config] of Object.entries(mergedEnvironments)) {
|
|
@@ -3057,7 +3070,6 @@ var init_initConfigs = __esm({
|
|
|
3057
3070
|
return defaultEntry;
|
|
3058
3071
|
};
|
|
3059
3072
|
const { environments, dev, server, provider, ...rsbuildSharedConfig } = normalizedConfig;
|
|
3060
|
-
const { assetPrefix, lazyCompilation } = dev;
|
|
3061
3073
|
const isEnvironmentEnabled = (name) => !specifiedEnvironments || specifiedEnvironments.includes(name);
|
|
3062
3074
|
const applyEnvironmentDefaultConfig = (config) => {
|
|
3063
3075
|
if (!config.source.entry || Object.keys(config.source.entry).length === 0) {
|
|
@@ -3076,10 +3088,12 @@ var init_initConfigs = __esm({
|
|
|
3076
3088
|
...mergeRsbuildConfig(
|
|
3077
3089
|
{
|
|
3078
3090
|
...rsbuildSharedConfig,
|
|
3079
|
-
dev:
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3091
|
+
dev: pick(dev, [
|
|
3092
|
+
"hmr",
|
|
3093
|
+
"assetPrefix",
|
|
3094
|
+
"progressBar",
|
|
3095
|
+
"lazyCompilation"
|
|
3096
|
+
])
|
|
3083
3097
|
},
|
|
3084
3098
|
config
|
|
3085
3099
|
)
|
|
@@ -3103,10 +3117,7 @@ var init_initConfigs = __esm({
|
|
|
3103
3117
|
return {
|
|
3104
3118
|
[defaultEnvironmentName]: applyEnvironmentDefaultConfig({
|
|
3105
3119
|
...rsbuildSharedConfig,
|
|
3106
|
-
dev:
|
|
3107
|
-
assetPrefix,
|
|
3108
|
-
lazyCompilation
|
|
3109
|
-
}
|
|
3120
|
+
dev: pick(dev, ["hmr", "assetPrefix", "progressBar", "lazyCompilation"])
|
|
3110
3121
|
})
|
|
3111
3122
|
};
|
|
3112
3123
|
};
|
|
@@ -5194,7 +5205,9 @@ var init_build = __esm({
|
|
|
5194
5205
|
});
|
|
5195
5206
|
return {
|
|
5196
5207
|
close: () => new Promise((resolve2) => {
|
|
5197
|
-
watching.close(
|
|
5208
|
+
watching.close(() => {
|
|
5209
|
+
resolve2();
|
|
5210
|
+
});
|
|
5198
5211
|
})
|
|
5199
5212
|
};
|
|
5200
5213
|
}
|
|
@@ -5322,7 +5335,7 @@ var init_basic2 = __esm({
|
|
|
5322
5335
|
name: "rsbuild:basic",
|
|
5323
5336
|
setup(api) {
|
|
5324
5337
|
api.modifyBundlerChain(
|
|
5325
|
-
(chain, { env,
|
|
5338
|
+
(chain, { env, isDev, target, bundler, environment, CHAIN_ID: CHAIN_ID2 }) => {
|
|
5326
5339
|
const { config } = environment;
|
|
5327
5340
|
chain.name(environment.name);
|
|
5328
5341
|
chain.devtool(getJsSourceMap(config));
|
|
@@ -5340,7 +5353,7 @@ var init_basic2 = __esm({
|
|
|
5340
5353
|
exportsPresence: "error"
|
|
5341
5354
|
}
|
|
5342
5355
|
});
|
|
5343
|
-
const usingHMR =
|
|
5356
|
+
const usingHMR = isDev && config.dev.hmr && target === "web";
|
|
5344
5357
|
if (usingHMR) {
|
|
5345
5358
|
chain.plugin(CHAIN_ID2.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin);
|
|
5346
5359
|
}
|
|
@@ -6150,7 +6163,7 @@ var init_resolve = __esm({
|
|
|
6150
6163
|
api.modifyBundlerChain({
|
|
6151
6164
|
order: "pre",
|
|
6152
6165
|
handler: (chain, { environment, CHAIN_ID: CHAIN_ID2 }) => {
|
|
6153
|
-
const { config } = environment;
|
|
6166
|
+
const { config, tsconfigPath } = environment;
|
|
6154
6167
|
applyExtensions({ chain });
|
|
6155
6168
|
applyAlias({
|
|
6156
6169
|
chain,
|
|
@@ -6158,19 +6171,12 @@ var init_resolve = __esm({
|
|
|
6158
6171
|
rootPath: api.context.rootPath
|
|
6159
6172
|
});
|
|
6160
6173
|
applyFullySpecified({ chain, config, CHAIN_ID: CHAIN_ID2 });
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
rspackConfig.resolve ||= {};
|
|
6167
|
-
if (typeof rspackConfig.resolve.tsConfig === "string") {
|
|
6168
|
-
return;
|
|
6174
|
+
if (tsconfigPath && // Only Rspack has the tsConfig option
|
|
6175
|
+
api.context.bundlerType === "rspack" && config.source.aliasStrategy === "prefer-tsconfig") {
|
|
6176
|
+
chain.resolve.tsConfig({
|
|
6177
|
+
configFile: tsconfigPath
|
|
6178
|
+
});
|
|
6169
6179
|
}
|
|
6170
|
-
rspackConfig.resolve.tsConfig = {
|
|
6171
|
-
configFile: tsconfigPath,
|
|
6172
|
-
...rspackConfig.resolve.tsConfig
|
|
6173
|
-
};
|
|
6174
6180
|
}
|
|
6175
6181
|
});
|
|
6176
6182
|
}
|
|
@@ -9778,7 +9784,7 @@ import { existsSync } from "fs";
|
|
|
9778
9784
|
import { program } from "../compiled/commander/index.js";
|
|
9779
9785
|
import color16 from "../compiled/picocolors/index.js";
|
|
9780
9786
|
function runCli() {
|
|
9781
|
-
program.name("rsbuild").usage("<command> [options]").version("1.0.
|
|
9787
|
+
program.name("rsbuild").usage("<command> [options]").version("1.0.3");
|
|
9782
9788
|
const devCommand = program.command("dev");
|
|
9783
9789
|
const buildCommand = program.command("build");
|
|
9784
9790
|
const previewCommand = program.command("preview");
|
|
@@ -9899,7 +9905,7 @@ function prepareCli() {
|
|
|
9899
9905
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
9900
9906
|
console.log();
|
|
9901
9907
|
}
|
|
9902
|
-
logger.greet(` ${`Rsbuild v${"1.0.
|
|
9908
|
+
logger.greet(` ${`Rsbuild v${"1.0.3"}`}
|
|
9903
9909
|
`);
|
|
9904
9910
|
}
|
|
9905
9911
|
var init_prepare = __esm({
|
|
@@ -9970,7 +9976,7 @@ init_mergeConfig();
|
|
|
9970
9976
|
init_helpers();
|
|
9971
9977
|
init_constants();
|
|
9972
9978
|
import { rspack as rspack10 } from "@rspack/core";
|
|
9973
|
-
var version = "1.0.
|
|
9979
|
+
var version = "1.0.3";
|
|
9974
9980
|
export {
|
|
9975
9981
|
PLUGIN_CSS_NAME,
|
|
9976
9982
|
PLUGIN_SWC_NAME,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ROOT_DIST_DIR = "dist";
|
|
2
|
-
export declare const HTML_DIST_DIR = "
|
|
2
|
+
export declare const HTML_DIST_DIR = "./";
|
|
3
3
|
export declare const JS_DIST_DIR = "static/js";
|
|
4
4
|
export declare const CSS_DIST_DIR = "static/css";
|
|
5
5
|
export declare const SVG_DIST_DIR = "static/svg";
|
|
@@ -994,7 +994,7 @@ export interface EnvironmentConfig {
|
|
|
994
994
|
/**
|
|
995
995
|
* Options for local development.
|
|
996
996
|
*/
|
|
997
|
-
dev?: Pick<DevConfig, '
|
|
997
|
+
dev?: Pick<DevConfig, 'hmr' | 'assetPrefix' | 'progressBar' | 'lazyCompilation'>;
|
|
998
998
|
/**
|
|
999
999
|
* Options for HTML generation.
|
|
1000
1000
|
*/
|
|
@@ -1068,7 +1068,7 @@ export interface RsbuildConfig extends EnvironmentConfig {
|
|
|
1068
1068
|
export type MergedEnvironmentConfig = {
|
|
1069
1069
|
mode: RsbuildMode;
|
|
1070
1070
|
root: string;
|
|
1071
|
-
dev: Pick<NormalizedDevConfig, '
|
|
1071
|
+
dev: Pick<NormalizedDevConfig, 'hmr' | 'assetPrefix' | 'progressBar' | 'lazyCompilation'>;
|
|
1072
1072
|
html: NormalizedHtmlConfig;
|
|
1073
1073
|
tools: NormalizedToolsConfig;
|
|
1074
1074
|
source: NormalizedSourceConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "~1.0.
|
|
49
|
+
"@rspack/core": "~1.0.5",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.0",
|
|
51
51
|
"@swc/helpers": "^0.5.13",
|
|
52
52
|
"caniuse-lite": "^1.0.30001659",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"reduce-configs": "^1.0.0",
|
|
86
86
|
"rsbuild-dev-middleware": "0.1.1",
|
|
87
87
|
"rslog": "^1.2.3",
|
|
88
|
-
"rspack-chain": "^1.0.
|
|
88
|
+
"rspack-chain": "^1.0.1",
|
|
89
89
|
"rspack-manifest-plugin": "5.0.1",
|
|
90
90
|
"sirv": "^2.0.4",
|
|
91
91
|
"style-loader": "3.3.4",
|