@rslib/core 0.16.1 → 0.17.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/chokidar/index.js +4 -4
- package/compiled/picocolors/index.js +2 -2
- package/compiled/tinyglobby/index.js +22 -22
- package/dist/index.js +53 -26
- package/dist-types/cli/commands.d.ts +1 -0
- package/dist-types/index.d.ts +2 -1
- package/dist-types/types/config.d.ts +14 -0
- package/dist-types/utils/logger.d.ts +1 -0
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
134: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NodeFsHandler =
|
|
7
7
|
exports.EVENTS =
|
|
@@ -803,7 +803,7 @@
|
|
|
803
803
|
}
|
|
804
804
|
exports.NodeFsHandler = NodeFsHandler;
|
|
805
805
|
},
|
|
806
|
-
|
|
806
|
+
617: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
807
807
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
808
808
|
exports.readdirpPromise =
|
|
809
809
|
exports.readdirp =
|
|
@@ -1107,8 +1107,8 @@
|
|
|
1107
1107
|
const promises_1 = __nccwpck_require__(943);
|
|
1108
1108
|
const events_1 = __nccwpck_require__(434);
|
|
1109
1109
|
const sysPath = __nccwpck_require__(928);
|
|
1110
|
-
const readdirp_1 = __nccwpck_require__(
|
|
1111
|
-
const handler_js_1 = __nccwpck_require__(
|
|
1110
|
+
const readdirp_1 = __nccwpck_require__(617);
|
|
1111
|
+
const handler_js_1 = __nccwpck_require__(134);
|
|
1112
1112
|
const SLASH = "/";
|
|
1113
1113
|
const SLASH_SLASH = "//";
|
|
1114
1114
|
const ONE_DOT = ".";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 831:
|
|
5
5
|
/***/ ((module) => {
|
|
6
6
|
|
|
7
7
|
let p = process || {}, argv = p.argv || [], env = p.env || {}
|
|
@@ -125,7 +125,7 @@ module.exports.createColors = createColors
|
|
|
125
125
|
/******/ // startup
|
|
126
126
|
/******/ // Load entry module and return exports
|
|
127
127
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
128
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
128
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(831);
|
|
129
129
|
/******/ module.exports = __webpack_exports__;
|
|
130
130
|
/******/
|
|
131
131
|
/******/ })()
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 676:
|
|
5
5
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
const pico = __nccwpck_require__(
|
|
11
|
-
const utils = __nccwpck_require__(
|
|
10
|
+
const pico = __nccwpck_require__(582);
|
|
11
|
+
const utils = __nccwpck_require__(473);
|
|
12
12
|
|
|
13
13
|
function picomatch(glob, options, returnState = false) {
|
|
14
14
|
// default to os.platform()
|
|
@@ -26,7 +26,7 @@ module.exports = picomatch;
|
|
|
26
26
|
|
|
27
27
|
/***/ }),
|
|
28
28
|
|
|
29
|
-
/***/
|
|
29
|
+
/***/ 717:
|
|
30
30
|
/***/ ((module) => {
|
|
31
31
|
|
|
32
32
|
"use strict";
|
|
@@ -214,14 +214,14 @@ module.exports = {
|
|
|
214
214
|
|
|
215
215
|
/***/ }),
|
|
216
216
|
|
|
217
|
-
/***/
|
|
217
|
+
/***/ 339:
|
|
218
218
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
219
219
|
|
|
220
220
|
"use strict";
|
|
221
221
|
|
|
222
222
|
|
|
223
|
-
const constants = __nccwpck_require__(
|
|
224
|
-
const utils = __nccwpck_require__(
|
|
223
|
+
const constants = __nccwpck_require__(717);
|
|
224
|
+
const utils = __nccwpck_require__(473);
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
227
|
* Constants
|
|
@@ -1307,16 +1307,16 @@ module.exports = parse;
|
|
|
1307
1307
|
|
|
1308
1308
|
/***/ }),
|
|
1309
1309
|
|
|
1310
|
-
/***/
|
|
1310
|
+
/***/ 582:
|
|
1311
1311
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1312
1312
|
|
|
1313
1313
|
"use strict";
|
|
1314
1314
|
|
|
1315
1315
|
|
|
1316
|
-
const scan = __nccwpck_require__(
|
|
1317
|
-
const parse = __nccwpck_require__(
|
|
1318
|
-
const utils = __nccwpck_require__(
|
|
1319
|
-
const constants = __nccwpck_require__(
|
|
1316
|
+
const scan = __nccwpck_require__(279);
|
|
1317
|
+
const parse = __nccwpck_require__(339);
|
|
1318
|
+
const utils = __nccwpck_require__(473);
|
|
1319
|
+
const constants = __nccwpck_require__(717);
|
|
1320
1320
|
const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
1321
1321
|
|
|
1322
1322
|
/**
|
|
@@ -1656,13 +1656,13 @@ module.exports = picomatch;
|
|
|
1656
1656
|
|
|
1657
1657
|
/***/ }),
|
|
1658
1658
|
|
|
1659
|
-
/***/
|
|
1659
|
+
/***/ 279:
|
|
1660
1660
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1661
1661
|
|
|
1662
1662
|
"use strict";
|
|
1663
1663
|
|
|
1664
1664
|
|
|
1665
|
-
const utils = __nccwpck_require__(
|
|
1665
|
+
const utils = __nccwpck_require__(473);
|
|
1666
1666
|
const {
|
|
1667
1667
|
CHAR_ASTERISK, /* * */
|
|
1668
1668
|
CHAR_AT, /* @ */
|
|
@@ -1679,7 +1679,7 @@ const {
|
|
|
1679
1679
|
CHAR_RIGHT_CURLY_BRACE, /* } */
|
|
1680
1680
|
CHAR_RIGHT_PARENTHESES, /* ) */
|
|
1681
1681
|
CHAR_RIGHT_SQUARE_BRACKET /* ] */
|
|
1682
|
-
} = __nccwpck_require__(
|
|
1682
|
+
} = __nccwpck_require__(717);
|
|
1683
1683
|
|
|
1684
1684
|
const isPathSeparator = code => {
|
|
1685
1685
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
@@ -2055,7 +2055,7 @@ module.exports = scan;
|
|
|
2055
2055
|
|
|
2056
2056
|
/***/ }),
|
|
2057
2057
|
|
|
2058
|
-
/***/
|
|
2058
|
+
/***/ 473:
|
|
2059
2059
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2060
2060
|
|
|
2061
2061
|
"use strict";
|
|
@@ -2067,7 +2067,7 @@ const {
|
|
|
2067
2067
|
REGEX_REMOVE_BACKSLASH,
|
|
2068
2068
|
REGEX_SPECIAL_CHARS,
|
|
2069
2069
|
REGEX_SPECIAL_CHARS_GLOBAL
|
|
2070
|
-
} = __nccwpck_require__(
|
|
2070
|
+
} = __nccwpck_require__(717);
|
|
2071
2071
|
|
|
2072
2072
|
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
2073
2073
|
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
|
@@ -2151,7 +2151,7 @@ module.exports = require("path");
|
|
|
2151
2151
|
|
|
2152
2152
|
/***/ }),
|
|
2153
2153
|
|
|
2154
|
-
/***/
|
|
2154
|
+
/***/ 278:
|
|
2155
2155
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2156
2156
|
|
|
2157
2157
|
//#region rolldown:runtime
|
|
@@ -2614,8 +2614,8 @@ var APIBuilder = class {
|
|
|
2614
2614
|
let pm = null;
|
|
2615
2615
|
/* c8 ignore next 6 */
|
|
2616
2616
|
try {
|
|
2617
|
-
/*require.resolve*/(
|
|
2618
|
-
pm = __nccwpck_require__(
|
|
2617
|
+
/*require.resolve*/(676);
|
|
2618
|
+
pm = __nccwpck_require__(676);
|
|
2619
2619
|
} catch {}
|
|
2620
2620
|
var Builder = class {
|
|
2621
2621
|
globCache = {};
|
|
@@ -2811,8 +2811,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
2811
2811
|
|
|
2812
2812
|
//#endregion
|
|
2813
2813
|
const path = __toESM(__nccwpck_require__(928));
|
|
2814
|
-
const fdir = __toESM(__nccwpck_require__(
|
|
2815
|
-
const picomatch = __toESM(__nccwpck_require__(
|
|
2814
|
+
const fdir = __toESM(__nccwpck_require__(278));
|
|
2815
|
+
const picomatch = __toESM(__nccwpck_require__(676));
|
|
2816
2816
|
|
|
2817
2817
|
//#region src/utils.ts
|
|
2818
2818
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
package/dist/index.js
CHANGED
|
@@ -505,17 +505,18 @@ const pluginEsmRequireShim = ()=>({
|
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
|
-
const
|
|
508
|
+
const isDebugKey = (keys)=>{
|
|
509
509
|
if (!process.env.DEBUG) return false;
|
|
510
510
|
const values = process.env.DEBUG.toLocaleLowerCase().split(',');
|
|
511
|
-
return
|
|
511
|
+
return keys.some((key)=>values.includes(key));
|
|
512
|
+
};
|
|
513
|
+
const isDebug = ()=>isDebugKey([
|
|
512
514
|
'rslib',
|
|
513
515
|
'rsbuild',
|
|
514
516
|
'rs*',
|
|
515
517
|
'rstack',
|
|
516
518
|
'*'
|
|
517
|
-
]
|
|
518
|
-
};
|
|
519
|
+
]);
|
|
519
520
|
if (isDebug()) logger.level = 'verbose';
|
|
520
521
|
function getTime() {
|
|
521
522
|
const now = new Date();
|
|
@@ -1661,7 +1662,7 @@ async function createConstantRsbuildConfig() {
|
|
|
1661
1662
|
}
|
|
1662
1663
|
});
|
|
1663
1664
|
}
|
|
1664
|
-
const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson, enabledShims })=>{
|
|
1665
|
+
const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson, enabledShims, advancedEsm })=>{
|
|
1665
1666
|
const jsParserOptions = {
|
|
1666
1667
|
cjs: {
|
|
1667
1668
|
requireResolve: false,
|
|
@@ -1679,12 +1680,14 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson, enabledS
|
|
|
1679
1680
|
worker: false
|
|
1680
1681
|
}
|
|
1681
1682
|
};
|
|
1683
|
+
const experimentalEsmOutput = bundle && 'esm' === format && advancedEsm;
|
|
1682
1684
|
const plugins = [
|
|
1683
1685
|
new __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack.experiments.RslibPlugin({
|
|
1684
1686
|
interceptApiPlugin: true,
|
|
1685
1687
|
forceNodeShims: enabledShims.esm.__dirname || enabledShims.esm.__filename
|
|
1686
|
-
})
|
|
1687
|
-
|
|
1688
|
+
}),
|
|
1689
|
+
experimentalEsmOutput && new __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack.experiments.EsmLibraryPlugin()
|
|
1690
|
+
].filter(Boolean);
|
|
1688
1691
|
switch(format){
|
|
1689
1692
|
case 'esm':
|
|
1690
1693
|
return {
|
|
@@ -1700,8 +1703,11 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson, enabledS
|
|
|
1700
1703
|
}
|
|
1701
1704
|
},
|
|
1702
1705
|
optimization: {
|
|
1703
|
-
concatenateModules:
|
|
1704
|
-
sideEffects: 'flag',
|
|
1706
|
+
concatenateModules: !experimentalEsmOutput,
|
|
1707
|
+
sideEffects: experimentalEsmOutput ? true : 'flag',
|
|
1708
|
+
runtimeChunk: experimentalEsmOutput ? {
|
|
1709
|
+
name: 'rslib-runtime'
|
|
1710
|
+
} : void 0,
|
|
1705
1711
|
avoidEntryIife: true,
|
|
1706
1712
|
splitChunks: {
|
|
1707
1713
|
chunks: 'async'
|
|
@@ -1709,7 +1715,7 @@ const composeFormatConfig = ({ format, bundle = true, umdName, pkgJson, enabledS
|
|
|
1709
1715
|
},
|
|
1710
1716
|
output: {
|
|
1711
1717
|
module: true,
|
|
1712
|
-
chunkFormat: 'module',
|
|
1718
|
+
chunkFormat: experimentalEsmOutput ? false : 'module',
|
|
1713
1719
|
library: {
|
|
1714
1720
|
type: 'modern-module'
|
|
1715
1721
|
},
|
|
@@ -2309,6 +2315,9 @@ const composeTargetConfig = (userTarget, format)=>{
|
|
|
2309
2315
|
config: {
|
|
2310
2316
|
tools: {
|
|
2311
2317
|
rspack: {
|
|
2318
|
+
externalsPresets: {
|
|
2319
|
+
node: false
|
|
2320
|
+
},
|
|
2312
2321
|
target: [
|
|
2313
2322
|
'node'
|
|
2314
2323
|
]
|
|
@@ -2363,7 +2372,8 @@ async function composeLibRsbuildConfig(config, multiCompilerIndex, root, sharedP
|
|
|
2363
2372
|
const pkgJson = readPackageJson(rootPath);
|
|
2364
2373
|
const { compilerOptions } = await loadTsconfig(rootPath, config.source?.tsconfigPath);
|
|
2365
2374
|
const cssModulesAuto = config.output?.cssModules?.auto ?? true;
|
|
2366
|
-
const { format = 'esm', shims, bundle = true, banner = {}, footer = {}, autoExtension = true, autoExternal, externalHelpers = false, redirect = {}, umdName } = config;
|
|
2375
|
+
const { format = 'esm', shims, bundle = true, banner = {}, footer = {}, autoExtension = true, autoExternal, externalHelpers = false, redirect = {}, umdName, experiments } = config;
|
|
2376
|
+
const advancedEsm = experiments?.advancedEsm;
|
|
2367
2377
|
const { rsbuildConfig: bundleConfig } = composeBundleConfig(bundle);
|
|
2368
2378
|
const { rsbuildConfig: shimsConfig, enabledShims } = composeShimsConfig(format, shims);
|
|
2369
2379
|
const formatConfig = composeFormatConfig({
|
|
@@ -2371,7 +2381,8 @@ async function composeLibRsbuildConfig(config, multiCompilerIndex, root, sharedP
|
|
|
2371
2381
|
pkgJson: pkgJson,
|
|
2372
2382
|
bundle,
|
|
2373
2383
|
umdName,
|
|
2374
|
-
enabledShims
|
|
2384
|
+
enabledShims,
|
|
2385
|
+
advancedEsm: advancedEsm ?? false
|
|
2375
2386
|
});
|
|
2376
2387
|
const externalHelpersConfig = composeExternalHelpersConfig(externalHelpers, pkgJson);
|
|
2377
2388
|
const userExternalsConfig = composeExternalsConfig(format, config.output?.externals);
|
|
@@ -2429,7 +2440,8 @@ async function composeCreateRsbuildConfig(rslibConfig) {
|
|
|
2429
2440
|
dts: true,
|
|
2430
2441
|
shims: true,
|
|
2431
2442
|
umdName: true,
|
|
2432
|
-
outBase: true
|
|
2443
|
+
outBase: true,
|
|
2444
|
+
experiments: true
|
|
2433
2445
|
}))
|
|
2434
2446
|
};
|
|
2435
2447
|
if ('string' == typeof libConfig.id) config.id = libConfig.id;
|
|
@@ -2515,7 +2527,7 @@ async function build(config, options = {}) {
|
|
|
2515
2527
|
const { environments } = await composeRsbuildEnvironments(config);
|
|
2516
2528
|
const rsbuildInstance = await (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.createRsbuild)({
|
|
2517
2529
|
callerName: 'rslib',
|
|
2518
|
-
|
|
2530
|
+
config: {
|
|
2519
2531
|
mode: 'production',
|
|
2520
2532
|
root: config.root,
|
|
2521
2533
|
plugins: config.plugins,
|
|
@@ -3117,11 +3129,15 @@ async function initConfig(options) {
|
|
|
3117
3129
|
...config.source.define
|
|
3118
3130
|
};
|
|
3119
3131
|
applyCliOptions(config, options, root);
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3132
|
+
if (isDebugKey([
|
|
3133
|
+
'rslib'
|
|
3134
|
+
])) {
|
|
3135
|
+
logger.debug('Rslib config used to generate Rsbuild environments:');
|
|
3136
|
+
logger.debug(`\n${node_util.inspect(config, {
|
|
3137
|
+
depth: null,
|
|
3138
|
+
colors: true
|
|
3139
|
+
})}`);
|
|
3140
|
+
}
|
|
3125
3141
|
return {
|
|
3126
3142
|
config,
|
|
3127
3143
|
configFilePath,
|
|
@@ -3135,7 +3151,7 @@ async function inspect(config, options = {}) {
|
|
|
3135
3151
|
const { environments } = await composeRsbuildEnvironments(config);
|
|
3136
3152
|
const rsbuildInstance = await (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.createRsbuild)({
|
|
3137
3153
|
callerName: 'rslib',
|
|
3138
|
-
|
|
3154
|
+
config: {
|
|
3139
3155
|
mode: 'production',
|
|
3140
3156
|
root: config.root,
|
|
3141
3157
|
plugins: config.plugins,
|
|
@@ -3171,7 +3187,7 @@ async function initMFRsbuild(config, options = {}) {
|
|
|
3171
3187
|
const selectedEnvironments = pruneEnvironments(environments, selectedEnvironmentIds);
|
|
3172
3188
|
const rsbuildInstance = await (0, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.createRsbuild)({
|
|
3173
3189
|
callerName: 'rslib',
|
|
3174
|
-
|
|
3190
|
+
config: {
|
|
3175
3191
|
mode: 'development',
|
|
3176
3192
|
root: config.root,
|
|
3177
3193
|
plugins: config.plugins,
|
|
@@ -3197,10 +3213,10 @@ const applyCommonOptions = (cli)=>{
|
|
|
3197
3213
|
};
|
|
3198
3214
|
function runCli() {
|
|
3199
3215
|
const cli = dist('rslib');
|
|
3200
|
-
cli.
|
|
3201
|
-
cli.version("0.16.1");
|
|
3216
|
+
cli.version("0.17.1");
|
|
3202
3217
|
applyCommonOptions(cli);
|
|
3203
|
-
const
|
|
3218
|
+
const buildDescription = `build the library for production ${picocolors.dim('(default if no command is given)')}`;
|
|
3219
|
+
const buildCommand = cli.command('', buildDescription).alias('build');
|
|
3204
3220
|
const inspectCommand = cli.command('inspect', 'inspect the Rsbuild / Rspack configs of Rslib projects');
|
|
3205
3221
|
const mfDevCommand = cli.command('mf-dev', 'start Rsbuild dev server of Module Federation format');
|
|
3206
3222
|
buildCommand.option('-w, --watch', 'turn on watch mode, watch for changes and rebuild').option('--entry <entry>', 'set entry file or pattern (repeatable)', {
|
|
@@ -3265,6 +3281,17 @@ function runCli() {
|
|
|
3265
3281
|
process.exit(1);
|
|
3266
3282
|
}
|
|
3267
3283
|
});
|
|
3284
|
+
cli.help((sections)=>{
|
|
3285
|
+
sections.shift();
|
|
3286
|
+
for (const section of sections){
|
|
3287
|
+
if ('Usage' === section.title) section.body = section.body.replace('$ rslib', picocolors.yellow('$ rslib [command] [options]'));
|
|
3288
|
+
if ('Commands' === section.title) section.body = section.body.replace(` ${buildDescription}`, `build ${buildDescription}`);
|
|
3289
|
+
if (section.title?.startsWith('For more info')) {
|
|
3290
|
+
section.title = picocolors.dim(' For details on a sub-command, run');
|
|
3291
|
+
section.body = picocolors.dim(' $ rslib <command> -h');
|
|
3292
|
+
} else section.title = picocolors.cyan(section.title);
|
|
3293
|
+
}
|
|
3294
|
+
});
|
|
3268
3295
|
cli.parse();
|
|
3269
3296
|
}
|
|
3270
3297
|
function initNodeEnv() {
|
|
@@ -3291,8 +3318,8 @@ function prepareCli() {
|
|
|
3291
3318
|
setupLogLevel();
|
|
3292
3319
|
const { npm_execpath } = process.env;
|
|
3293
3320
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) logger.log();
|
|
3294
|
-
logger.greet(` Rslib v0.
|
|
3321
|
+
logger.greet(` Rslib v0.17.1\n`);
|
|
3295
3322
|
}
|
|
3296
|
-
const src_version = "0.
|
|
3323
|
+
const src_version = "0.17.1";
|
|
3297
3324
|
var __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__.rspack;
|
|
3298
3325
|
export { build, defineConfig, inspect, loadConfig, logger, prepareCli, __WEBPACK_EXTERNAL_MODULE__rsbuild_core_1b356efc__ as rsbuild, runCli, startMFDevServer, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, src_version as version, __webpack_exports__rspack as rspack };
|
package/dist-types/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export { composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, defi
|
|
|
7
7
|
export type * from './types';
|
|
8
8
|
export { logger } from './utils/logger';
|
|
9
9
|
export declare const version: string;
|
|
10
|
+
export type * as Rsbuild from '@rsbuild/core';
|
|
10
11
|
export * as rsbuild from '@rsbuild/core';
|
|
11
|
-
export { type Rspack, rspack } from '@rsbuild/core';
|
|
12
|
+
export { type RsbuildPlugin, type Rspack, rspack } from '@rsbuild/core';
|
|
@@ -193,6 +193,14 @@ export type Redirect = {
|
|
|
193
193
|
/** Controls the redirect of the import paths of output TypeScript declaration files. */
|
|
194
194
|
dts?: DtsRedirect;
|
|
195
195
|
};
|
|
196
|
+
export type LibExperiments = {
|
|
197
|
+
/**
|
|
198
|
+
* Whether to enable Rspack advanced ESM output.
|
|
199
|
+
* @defaultValue `false`
|
|
200
|
+
* @see {@link https://rslib.rs/config/lib/experiments#experimentsadvancedesm}
|
|
201
|
+
*/
|
|
202
|
+
advancedEsm?: boolean;
|
|
203
|
+
};
|
|
196
204
|
export interface LibConfig extends EnvironmentConfig {
|
|
197
205
|
/**
|
|
198
206
|
* The unique identifier of the library.
|
|
@@ -295,6 +303,12 @@ export interface LibConfig extends EnvironmentConfig {
|
|
|
295
303
|
* @inheritdoc
|
|
296
304
|
*/
|
|
297
305
|
output?: RslibOutputConfig;
|
|
306
|
+
/**
|
|
307
|
+
* Options for experimental features.
|
|
308
|
+
* @defaultValue `{}`
|
|
309
|
+
* @see {@link https://rslib.rs/config/lib/experiments}
|
|
310
|
+
*/
|
|
311
|
+
experiments?: LibExperiments;
|
|
298
312
|
}
|
|
299
313
|
export type LibOnlyConfig = Omit<LibConfig, keyof EnvironmentConfig>;
|
|
300
314
|
interface RslibOutputConfig extends OutputConfig {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* and important alerts that require attention.
|
|
14
14
|
*/
|
|
15
15
|
import { type Logger, logger } from '../../compiled/rslog';
|
|
16
|
+
export declare const isDebugKey: (keys: string[]) => boolean;
|
|
16
17
|
export declare const isDebug: () => boolean;
|
|
17
18
|
export { logger };
|
|
18
19
|
export type { Logger };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslib/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "The Rsbuild-based library development tool.",
|
|
5
5
|
"homepage": "https://rslib.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rsbuild/core": "1.6.
|
|
40
|
-
"rsbuild-plugin-dts": "0.
|
|
39
|
+
"@rsbuild/core": "~1.6.2",
|
|
40
|
+
"rsbuild-plugin-dts": "0.17.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@module-federation/rsbuild-plugin": "^0.21.
|
|
43
|
+
"@module-federation/rsbuild-plugin": "^0.21.2",
|
|
44
44
|
"@types/fs-extra": "^11.0.4",
|
|
45
45
|
"cac": "^6.7.14",
|
|
46
46
|
"chokidar": "^4.0.3",
|
|
47
47
|
"fs-extra": "^11.3.2",
|
|
48
|
-
"memfs": "^4.
|
|
48
|
+
"memfs": "^4.50.0",
|
|
49
49
|
"path-serializer": "0.5.1",
|
|
50
50
|
"picocolors": "1.1.1",
|
|
51
|
-
"prebundle": "1.
|
|
51
|
+
"prebundle": "1.5.0",
|
|
52
52
|
"rsbuild-plugin-publint": "^0.3.3",
|
|
53
|
-
"rslib": "npm:@rslib/core@0.
|
|
53
|
+
"rslib": "npm:@rslib/core@0.17.0",
|
|
54
54
|
"rslog": "^1.3.0",
|
|
55
55
|
"tinyglobby": "0.2.14",
|
|
56
56
|
"tsconfck": "3.1.6",
|