Interface: ExternalBundleLibConfig
Rslib config shape accepted by defineExternalBundleRslibConfig.
Extends
LibConfig
Properties
autoExtension?
optionalautoExtension?:boolean
Whether to automatically set the file extension based on format option in the JavaScript output files.
Default Value
true
See
https://rslib.rs/config/lib/auto-extension
Inherited from
LibConfig.autoExtension
autoExternal?
optionalautoExternal?:AutoExternal
Whether to automatically externalize dependencies of different dependency types and do not bundle them.
Deprecated
Use output.autoExternal instead.
Default Value
true when format is cjs or esm, false when format is umd or mf.
See
https://rslib.rs/config/lib/auto-external
Inherited from
LibConfig.autoExternal
banner?
optionalbanner?:BannerAndFooter
Inject content into the top of each JavaScript, CSS or declaration file.
Default Value
{}
See
https://rslib.rs/config/lib/banner
Inherited from
LibConfig.banner
bundle?
optionalbundle?:boolean
Whether to bundle the library.
Default Value
true
See
https://rslib.rs/config/lib/bundle
Inherited from
LibConfig.bundle
dev?
optionaldev?:Pick<DevConfig,AllowedEnvironmentDevKeys>
Options for local development.
Inherited from
LibConfig.dev
dts?
optionaldts?:Dts
Configure the generation of the TypeScript declaration files.
Default Value
false
See
https://rslib.rs/config/lib/dts
Inherited from
LibConfig.dts
experiments?
optionalexperiments?:LibExperiments
Options for experimental features.
Default Value
{}
See
https://rslib.rs/config/lib/experiments
Inherited from
LibConfig.experiments
externalHelpers?
optionalexternalHelpers?:boolean
Whether to import SWC helper functions from @swc/helpers instead of inlining them.
Default Value
false
See
https://rslib.rs/config/lib/external-helpers
Inherited from
LibConfig.externalHelpers
footer?
optionalfooter?:BannerAndFooter
Inject content into the bottom of each JavaScript, CSS or declaration file.
Default Value
{}
See
https://rslib.rs/config/lib/footer
Inherited from
LibConfig.footer
format?
optionalformat?:Format
Output format for the generated JavaScript files.
Default Value
'esm'
See
https://rslib.rs/config/lib/format
Inherited from
LibConfig.format
html?
optionalhtml?:HtmlConfig
Options for HTML generation.
Inherited from
LibConfig.html
id?
optionalid?:string
The unique identifier of the library.
Default Value
undefined
See
https://rslib.rs/config/lib/id
Inherited from
LibConfig.id
moduleFederation?
optionalmoduleFederation?:ModuleFederationConfig
Options for module federation.
Inherited from
LibConfig.moduleFederation
outBase?
optionaloutBase?:string
The base directory of the output files.
Default Value
undefined
See
https://rslib.rs/config/lib/out-base
Inherited from
LibConfig.outBase
output?
optionaloutput?:OutputConfig
Inherit Doc
Overrides
LibConfig.output
performance?
optionalperformance?:PerformanceConfig
Options for build performance and runtime performance.
Inherited from
LibConfig.performance
plugins?
optionalplugins?:RsbuildPlugins
Configure Rsbuild plugins.
Inherited from
LibConfig.plugins
redirect?
optionalredirect?:Redirect
Configure the redirect of the import paths, applicable bundle is set to false.
Default Value
{}
See
https://rslib.rs/config/lib/redirect
Inherited from
LibConfig.redirect
resolve?
optionalresolve?:ResolveConfig
Options for module resolution.
Inherited from
LibConfig.resolve
security?
optionalsecurity?:SecurityConfig
Options for Web security.
Inherited from
LibConfig.security
shims?
optionalshims?:Shims
Configure the shims for CommonJS and ESM output.
Default Value
See
https://rslib.rs/config/lib/shims
Inherited from
LibConfig.shims
source?
optionalsource?:SourceConfig
Options for input source code.
Inherited from
LibConfig.source
splitChunks?
optionalsplitChunks?:false|SplitChunksConfig
Options for chunk splitting.
Inherited from
LibConfig.splitChunks
syntax?
optionalsyntax?:Syntax
Configure the syntax to which JavaScript and CSS will be downgraded.
Default Value
'esnext'
See
https://rslib.rs/config/lib/syntax
Inherited from
LibConfig.syntax
tools?
optionaltools?:ToolsConfig
Options for the low-level tools.
Inherited from
LibConfig.tools
umdName?
optionalumdName?:LibraryName
The export name of the UMD bundle.
Default Value
undefined
See
https://rslib.rs/config/lib/umd-name
Inherited from
LibConfig.umdName
wasm?
optionalwasm?:Wasm
Configure how Rslib handles .wasm modules. Set to false to leave
ESM .wasm imports exactly as written in the source.
This option can only be configured when format is 'esm'.
Default Value
{ mode: 'compile' } when bundle is true; { mode: 'preserve' } when bundle is false.
See
https://rslib.rs/config/lib/wasm
Inherited from
LibConfig.wasm