Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/builder-rslib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mainset/builder-rslib",
"version": "0.2.0",
"version": "0.3.0-rc.1",
"description": "Builder for node packages",
"homepage": "https://github.com/mainset/dev-stack-fe/tree/main/packages/builder-rslib",
"bugs": {
Expand Down Expand Up @@ -28,9 +28,9 @@
"dev": "cross-env NODE_ENV=development ms-cli source-code --exec watch"
},
"dependencies": {
"@rsbuild/plugin-react": "^1.4.1",
"@rsbuild/plugin-sass": "^1.4.0",
"@rslib/core": "^0.15.0"
"@rsbuild/plugin-react": "^1.4.5",
"@rsbuild/plugin-sass": "^1.5.0",
"@rslib/core": "^0.20.0"
},
"devDependencies": {
"@mainset/cli": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/builder-rslib/src/rslib.node-sourcer.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const nodeSourcerCommonPresetRslib = defineConfig({
],
source: {
entry: {
index: [path.join(runtimePathById.src, 'index.mts')],
index: path.join(runtimePathById.src, 'index.mts'),
},
},
output: {
Expand Down
10 changes: 9 additions & 1 deletion packages/cli/src/commands/node-sourcer.mts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ function registerNodeSourcerCommand(program: Command) {
.requiredOption('-e, --exec <type>', 'Execution mode: build or watch')
// .option('-b, --builder <builder>', 'Builder tool (default: rslib)', 'rslib')
.option('-c, --config <path>', 'Path to config file', './rslib.config.mts')
.option(
'--no-bundle',
'Bundleless mode, means that each source file is compiled and built separately.',
)
.action((options) => {
// Step 0: determinate command params
const customRslibConfigPath = path.resolve(
Expand All @@ -47,7 +51,9 @@ function registerNodeSourcerCommand(program: Command) {

// Step 2: build source code
console.log('\n📦 Compiling Source Code with Rslib ...');
execImmediateRslibCLICommand(`build --config ${rslibConfigPath}`);
execImmediateRslibCLICommand(
`build --config ${rslibConfigPath} --no-bundle ${options.bundle}`,
);

// Step 3: build type only
execImmediateTypeScriptCompileTypeOnly();
Expand All @@ -69,6 +75,8 @@ function registerNodeSourcerCommand(program: Command) {
'build',
'--config',
rslibConfigPath,
'--no-bundle',
options.bundle,
'--watch',
]);

Expand Down
Loading