Skip to content
Bullet

@clutchify/bullet-core

Type Aliases

ChainCallback

ChainCallback = (chain, context) => void

Optional callback to modify an rspack-chain instance before it is finalized.

Parameters

ParameterType
chainRspackChain
contextChainCallbackContext

Returns

void


ChainCallbackContext

ChainCallbackContext = object

Context passed to every ChainCallback.

Properties

PropertyType
CHAIN_IDChainIdentifier
modeMode
platformPlatform

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

ParameterTypeDescription
optionsCreateClientConfigurationOptionsConfiguration name, entry file, and optional rendering mode.
callback?ChainCallbackOptional 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

ParameterTypeDescription
optionsCreateNativeConfigurationOptionsConfiguration name, entry file, and target platform.
callback?ChainCallbackOptional 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

ParameterTypeDescription
optionsCreateConfigurationOptionsConfiguration name and entry file.
callback?ChainCallbackOptional function to modify the rspack-chain before finalization.

Returns

RspackOptions

A complete Rspack configuration object.