@rslib/core 0.5.0-alpha.0 → 0.5.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/dist/index.js
CHANGED
|
@@ -160,7 +160,7 @@ function prepareCli() {
|
|
|
160
160
|
initNodeEnv();
|
|
161
161
|
const { npm_execpath } = process.env;
|
|
162
162
|
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) console.log();
|
|
163
|
-
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rslib v0.5.
|
|
163
|
+
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rslib v0.5.1\n`);
|
|
164
164
|
}
|
|
165
165
|
const DEFAULT_CONFIG_NAME = 'rslib.config';
|
|
166
166
|
const DEFAULT_CONFIG_EXTENSIONS = [
|
|
@@ -2027,7 +2027,7 @@ const composeEntryConfig = async (rawEntry, bundle, root, cssModulesAuto, userOu
|
|
|
2027
2027
|
outBase
|
|
2028
2028
|
};
|
|
2029
2029
|
};
|
|
2030
|
-
const composeBundlelessExternalConfig = (jsExtension, redirect, cssModulesAuto, bundle,
|
|
2030
|
+
const composeBundlelessExternalConfig = (jsExtension, redirect, cssModulesAuto, bundle, outBase)=>{
|
|
2031
2031
|
if (bundle) return {
|
|
2032
2032
|
config: {}
|
|
2033
2033
|
};
|
|
@@ -2054,7 +2054,8 @@ const composeBundlelessExternalConfig = (jsExtension, redirect, cssModulesAuto,
|
|
|
2054
2054
|
try {
|
|
2055
2055
|
let resolvedRequest = request;
|
|
2056
2056
|
resolvedRequest = await resolver(context, resolvedRequest);
|
|
2057
|
-
|
|
2057
|
+
if ('string' != typeof outBase) throw new Error(`outBase expect to be a string in bundleless mode, but got ${outBase}`);
|
|
2058
|
+
const isSubpath = normalizeSlash(resolvedRequest).startsWith(`${normalizeSlash(outBase)}/`);
|
|
2058
2059
|
if (isSubpath) {
|
|
2059
2060
|
resolvedRequest = normalizeSlash(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].relative(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname(issuer), resolvedRequest));
|
|
2060
2061
|
if ('.' !== resolvedRequest[0]) resolvedRequest = `./${resolvedRequest}`;
|
|
@@ -2203,7 +2204,8 @@ async function composeLibRsbuildConfig(config, root, sharedPlugins) {
|
|
|
2203
2204
|
const externalHelpersConfig = composeExternalHelpersConfig(externalHelpers, pkgJson);
|
|
2204
2205
|
const userExternalsConfig = composeExternalsConfig(format, config.output?.externals);
|
|
2205
2206
|
const { config: autoExtensionConfig, jsExtension, dtsExtension } = composeAutoExtensionConfig(config, autoExtension, pkgJson);
|
|
2206
|
-
const {
|
|
2207
|
+
const { entryConfig, outBase } = await composeEntryConfig(config.source?.entry, config.bundle, rootPath, cssModulesAuto, config.outBase);
|
|
2208
|
+
const { config: bundlelessExternalConfig } = composeBundlelessExternalConfig(jsExtension, redirect, cssModulesAuto, bundle, outBase);
|
|
2207
2209
|
const { config: targetConfig, externalsConfig: targetExternalsConfig, target } = composeTargetConfig(config.output?.target, format);
|
|
2208
2210
|
const syntaxConfig = composeSyntaxConfig(target, config?.syntax);
|
|
2209
2211
|
const autoExternalConfig = composeAutoExternalConfig({
|
|
@@ -2213,7 +2215,6 @@ async function composeLibRsbuildConfig(config, root, sharedPlugins) {
|
|
|
2213
2215
|
pkgJson,
|
|
2214
2216
|
userExternals: config.output?.externals
|
|
2215
2217
|
});
|
|
2216
|
-
const { entryConfig, outBase } = await composeEntryConfig(config.source?.entry, config.bundle, rootPath, cssModulesAuto, config.outBase);
|
|
2217
2218
|
const cssConfig = composeCssConfig(outBase, config.bundle, banner?.css, footer?.css);
|
|
2218
2219
|
const assetConfig = composeAssetConfig(bundle, format);
|
|
2219
2220
|
const entryChunkConfig = composeEntryChunkConfig({
|
|
@@ -2441,7 +2442,7 @@ const repeatableOption = (value, previous)=>(previous ?? []).concat([
|
|
|
2441
2442
|
value
|
|
2442
2443
|
]);
|
|
2443
2444
|
function runCli() {
|
|
2444
|
-
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.name('rslib').usage('<command> [options]').version("0.5.
|
|
2445
|
+
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.name('rslib').usage('<command> [options]').version("0.5.1");
|
|
2445
2446
|
const buildCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.command('build');
|
|
2446
2447
|
const inspectCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.command('inspect');
|
|
2447
2448
|
const mfDevCommand = __WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.command('mf-dev');
|
|
@@ -2502,6 +2503,6 @@ function runCli() {
|
|
|
2502
2503
|
});
|
|
2503
2504
|
__WEBPACK_EXTERNAL_MODULE__compiled_commander_index_js_bca3ceaa__.program.parse();
|
|
2504
2505
|
}
|
|
2505
|
-
const src_rslib_entry_version = "0.5.
|
|
2506
|
+
const src_rslib_entry_version = "0.5.1";
|
|
2506
2507
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger;
|
|
2507
2508
|
export { build, defineConfig, inspect, loadConfig, prepareCli, runCli, startMFDevServer, composeCreateRsbuildConfig as unstable_composeCreateRsbuildConfig, src_rslib_entry_version as version, __webpack_exports__logger as logger };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslib/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "The Rsbuild-based library development tool.",
|
|
5
5
|
"homepage": "https://lib.rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rsbuild/core": "~1.2.
|
|
40
|
-
"tinyglobby": "^0.2.
|
|
41
|
-
"rsbuild-plugin-dts": "0.5.
|
|
39
|
+
"@rsbuild/core": "~1.2.10",
|
|
40
|
+
"tinyglobby": "^0.2.12",
|
|
41
|
+
"rsbuild-plugin-dts": "0.5.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@module-federation/rsbuild-plugin": "^0.8.
|
|
44
|
+
"@module-federation/rsbuild-plugin": "^0.8.12",
|
|
45
45
|
"@types/fs-extra": "^11.0.4",
|
|
46
46
|
"chokidar": "^4.0.3",
|
|
47
47
|
"commander": "^13.1.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"picocolors": "1.1.1",
|
|
51
51
|
"prebundle": "1.2.7",
|
|
52
52
|
"rsbuild-plugin-publint": "^0.3.0",
|
|
53
|
-
"rslib": "npm:@rslib/core@0.
|
|
53
|
+
"rslib": "npm:@rslib/core@0.5.0",
|
|
54
54
|
"rslog": "^1.2.3",
|
|
55
55
|
"tsconfck": "3.1.5",
|
|
56
56
|
"typescript": "^5.7.3",
|