@rslib/core 0.6.7 → 0.6.9
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/dist/index.js +18 -9
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -181,7 +181,7 @@ function prepareCli() {
|
|
|
181
181
|
initNodeEnv();
|
|
182
182
|
const { npm_execpath } = process.env;
|
|
183
183
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
184
|
-
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rslib v0.6.
|
|
184
|
+
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rslib v0.6.9\n`);
|
|
185
185
|
}
|
|
186
186
|
const DEFAULT_CONFIG_NAME = 'rslib.config';
|
|
187
187
|
const DEFAULT_CONFIG_EXTENSIONS = [
|
|
@@ -1668,6 +1668,9 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1668
1668
|
esm: {
|
|
1669
1669
|
importMeta: false,
|
|
1670
1670
|
importDynamic: false
|
|
1671
|
+
},
|
|
1672
|
+
others: {
|
|
1673
|
+
worker: false
|
|
1671
1674
|
}
|
|
1672
1675
|
};
|
|
1673
1676
|
switch(format){
|
|
@@ -1679,7 +1682,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1679
1682
|
parser: {
|
|
1680
1683
|
javascript: {
|
|
1681
1684
|
...jsParserOptions.esm,
|
|
1682
|
-
...jsParserOptions.cjs
|
|
1685
|
+
...jsParserOptions.cjs,
|
|
1686
|
+
...jsParserOptions.others
|
|
1683
1687
|
}
|
|
1684
1688
|
}
|
|
1685
1689
|
},
|
|
@@ -1712,7 +1716,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1712
1716
|
parser: {
|
|
1713
1717
|
javascript: {
|
|
1714
1718
|
...jsParserOptions.esm,
|
|
1715
|
-
...jsParserOptions.cjs
|
|
1719
|
+
...jsParserOptions.cjs,
|
|
1720
|
+
...jsParserOptions.others
|
|
1716
1721
|
}
|
|
1717
1722
|
}
|
|
1718
1723
|
},
|
|
@@ -1785,8 +1790,8 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson })=>{
|
|
|
1785
1790
|
throw new Error(`Unsupported format: ${format}`);
|
|
1786
1791
|
}
|
|
1787
1792
|
};
|
|
1788
|
-
const
|
|
1789
|
-
name: 'rsbuild:
|
|
1793
|
+
const disableUrlParseRsbuildPlugin = ()=>({
|
|
1794
|
+
name: 'rsbuild:disable-url-parse',
|
|
1790
1795
|
setup (api) {
|
|
1791
1796
|
api.modifyBundlerChain((config, { CHAIN_ID })=>{
|
|
1792
1797
|
config.module.rule(CHAIN_ID.RULE.JS).parser({
|
|
@@ -1830,14 +1835,15 @@ const composeShimsConfig = (format, shims)=>{
|
|
|
1830
1835
|
},
|
|
1831
1836
|
plugins: [
|
|
1832
1837
|
resolvedShims.esm.require && pluginEsmRequireShim(),
|
|
1833
|
-
|
|
1838
|
+
disableUrlParseRsbuildPlugin()
|
|
1834
1839
|
].filter(Boolean)
|
|
1835
1840
|
};
|
|
1836
1841
|
break;
|
|
1837
1842
|
case 'cjs':
|
|
1838
1843
|
rsbuildConfig = {
|
|
1839
1844
|
plugins: [
|
|
1840
|
-
resolvedShims.cjs['import.meta.url'] && pluginCjsImportMetaUrlShim()
|
|
1845
|
+
resolvedShims.cjs['import.meta.url'] && pluginCjsImportMetaUrlShim(),
|
|
1846
|
+
disableUrlParseRsbuildPlugin()
|
|
1841
1847
|
].filter(Boolean)
|
|
1842
1848
|
};
|
|
1843
1849
|
break;
|
|
@@ -2353,6 +2359,7 @@ const beforeRestart = async ({ filePath, clear = true } = {})=>{
|
|
|
2353
2359
|
async function build(config, options = {}) {
|
|
2354
2360
|
const { environments } = await composeRsbuildEnvironments(config);
|
|
2355
2361
|
const rsbuildInstance = await (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.createRsbuild)({
|
|
2362
|
+
callerName: 'rslib',
|
|
2356
2363
|
rsbuildConfig: {
|
|
2357
2364
|
mode: 'production',
|
|
2358
2365
|
root: config.root,
|
|
@@ -2404,6 +2411,7 @@ async function init(options) {
|
|
|
2404
2411
|
async function inspect(config, options = {}) {
|
|
2405
2412
|
const { environments } = await composeRsbuildEnvironments(config);
|
|
2406
2413
|
const rsbuildInstance = await (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.createRsbuild)({
|
|
2414
|
+
callerName: 'rslib',
|
|
2407
2415
|
rsbuildConfig: {
|
|
2408
2416
|
mode: 'production',
|
|
2409
2417
|
root: config.root,
|
|
@@ -2435,6 +2443,7 @@ async function initMFRsbuild(config, options = {}) {
|
|
|
2435
2443
|
if (!selectedEnvironmentIds.length) throw new Error(`No mf format found in ${options.lib ? `libs ${options.lib.map((lib)=>`"${lib}"`).join(', ')}` : 'your config'}, please check your config to ensure that the mf format is enabled correctly.`);
|
|
2436
2444
|
const selectedEnvironments = pruneEnvironments(environments, selectedEnvironmentIds);
|
|
2437
2445
|
const rsbuildInstance = await (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.createRsbuild)({
|
|
2446
|
+
callerName: 'rslib',
|
|
2438
2447
|
rsbuildConfig: {
|
|
2439
2448
|
mode: 'development',
|
|
2440
2449
|
root: config.root,
|
|
@@ -2455,7 +2464,7 @@ const repeatableOption = (value, previous)=>(previous ?? []).concat([
|
|
|
2455
2464
|
value
|
|
2456
2465
|
]);
|
|
2457
2466
|
function runCli() {
|
|
2458
|
-
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.name('rslib').usage('<command> [options]').version("0.6.
|
|
2467
|
+
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.name('rslib').usage('<command> [options]').version("0.6.9");
|
|
2459
2468
|
const buildCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.command('build');
|
|
2460
2469
|
const inspectCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.command('inspect');
|
|
2461
2470
|
const mfDevCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.command('mf-dev');
|
|
@@ -2516,7 +2525,7 @@ function runCli() {
|
|
|
2516
2525
|
});
|
|
2517
2526
|
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.parse();
|
|
2518
2527
|
}
|
|
2519
|
-
const src_version = "0.6.
|
|
2528
|
+
const src_version = "0.6.9";
|
|
2520
2529
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger;
|
|
2521
2530
|
var __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack;
|
|
2522
2531
|
export { build, defineConfig, inspect, loadConfig, prepareCli, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__ as rsbuild, runCli, startMFDevServer, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslib/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "The Rsbuild-based library development tool.",
|
|
5
5
|
"homepage": "https://lib.rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rsbuild/core": "1.3.
|
|
39
|
+
"@rsbuild/core": "1.3.18",
|
|
40
40
|
"tinyglobby": "^0.2.13",
|
|
41
|
-
"rsbuild-plugin-dts": "0.6.
|
|
41
|
+
"rsbuild-plugin-dts": "0.6.9"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@module-federation/rsbuild-plugin": "^0.13.
|
|
44
|
+
"@module-federation/rsbuild-plugin": "^0.13.1",
|
|
45
45
|
"@types/fs-extra": "^11.0.4",
|
|
46
46
|
"chokidar": "^4.0.3",
|
|
47
47
|
"commander": "^13.1.0",
|
|
48
48
|
"fs-extra": "^11.3.0",
|
|
49
|
-
"memfs": "^4.17.
|
|
49
|
+
"memfs": "^4.17.1",
|
|
50
50
|
"picocolors": "1.1.1",
|
|
51
51
|
"prebundle": "1.3.3",
|
|
52
|
-
"rsbuild-plugin-publint": "^0.3.
|
|
53
|
-
"rslib": "npm:@rslib/core@0.6.
|
|
52
|
+
"rsbuild-plugin-publint": "^0.3.1",
|
|
53
|
+
"rslib": "npm:@rslib/core@0.6.8",
|
|
54
54
|
"rslog": "^1.2.3",
|
|
55
55
|
"tsconfck": "3.1.5",
|
|
56
56
|
"typescript": "^5.8.3",
|