-
-
Notifications
You must be signed in to change notification settings - Fork 54
Labels
Description
What problem does this feature solve?
To build with specific lib configs (aka environment) only. For example, a library has 5 lib configs:
- esm build with modern syntax
- cjs build with modern syntax
- esm build with legacy syntax
- dts build
- other package files
and only 1 or 2 is useful for development/test. we can filter out the others
What does the proposed API look like?
Rslib Config
{
"lib": [
{ "name": "x", ... },
{ "name": "y", ... },
{ "name": "z", ... },
{ ... },
{ ... },
]
}Rslib CLI
--only x --only y
--only x,y
Rsbuild
createRsbuild({
rsbuildConfig: {
environments: {
x: { ... },
y: { ... },
z: { ... },
esm0: { ... },
esm1: { ... },
}
},
environment: args.only
}Timeless0911 and fi3ework