@clutchify/bullet-core
Type Aliases
ChainCallback
ChainCallback = (
chain,context) =>void
Optional callback to modify an rspack-chain instance before it is finalized.
Parameters
| Parameter | Type |
|---|---|
chain | RspackChain |
context | ChainCallbackContext |
Returns
void
ChainCallbackContext
ChainCallbackContext =
object
Context passed to every ChainCallback.
Properties
| Property | Type |
|---|---|
CHAIN_ID | ChainIdentifier |
mode | Mode |
platform | Platform |
ChainIdentifier
ChainIdentifier = typeof
CHAIN_ID
Shape of the CHAIN_ID constant, used for type-safe plugin and rule lookups.
Manifest
Manifest =
Record<string,any>
Platform
Platform =
"web"|"android"|"ios"|"node"
Target platform for a build configuration.
Functions
createClientConfiguration()
createClientConfiguration(
options,callback?):RspackOptions
Builds an Rspack configuration for the web client bundle.
In development, adds HotModuleReplacement, ReactRefresh, and the custom HMR client
entry that connects to the server's WebSocket. In both modes a manifest is generated for
SSR asset injection.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | CreateClientConfigurationOptions | Configuration name, entry file, and optional rendering mode. |
callback? | ChainCallback | Optional function to modify the rspack-chain before finalization. |
Returns
RspackOptions
A complete Rspack configuration object.
createNativeConfiguration()
createNativeConfiguration(
options,callback?):RspackOptions
Builds an Rspack configuration for a React Native platform (Android or iOS).
Includes the Re.Pack plugin, babel-swc loader, asset transforms, platform-aware resolve
options, and the __DEV__/EXPO_OS defines. Pass callback to extend or override
any part of the chain before it is finalized.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | CreateNativeConfigurationOptions | Configuration name, entry file, and target platform. |
callback? | ChainCallback | Optional function to modify the rspack-chain before finalization. |
Returns
RspackOptions
A complete Rspack configuration object.
createServerConfiguration()
createServerConfiguration(
options,callback?):RspackOptions
Builds an Rspack configuration for the server-side rendering bundle.
The output is an ES module library (output.library.type: "modern-module") targeting
async-node, ready for dynamic import inside a Node VM sandbox.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | CreateConfigurationOptions | Configuration name and entry file. |
callback? | ChainCallback | Optional function to modify the rspack-chain before finalization. |
Returns
RspackOptions
A complete Rspack configuration object.