This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/rspeedy

rspeedy package

The document contains all the configurations of the @lynx-js/rspeedy package.

Example

Use lynx.config.ts with to get better TypeScript intellisense.

import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
  entry: './src/index.tsx',
})

Functions

Function

Description

createRspeedy({ cwd, rspeedyConfig, loadEnv, environment, callerName, }, input)

The createRspeedy method can let you create a Rspeedy instance and you can customize the build or development process in Node.js Runtime.

defineConfig(config)

The defineConfig method is a helper function used to get TypeScript intellisense.

defineConfig(config)

The defineConfig method is a helper function used to get TypeScript intellisense.

defineConfig(config)

The defineConfig method is a helper function used to get TypeScript intellisense.

defineConfig(config)

The defineConfig method is a helper function used to get TypeScript intellisense.

loadConfig(loadConfigOptions)

Load the build config by the config path.

mergeRspeedyConfig(configs)

Merge multiple Rspeedy configuration objects.

Interfaces

Interface

Description

BuildCache

(BETA) Enable or configure persistent build cache.

ChunkSplit

Performance.chunkSplit is used to configure the chunk splitting strategy.

ChunkSplitBySize

Performance.chunkSplit is used to configure the chunk splitting strategy.

ChunkSplitCustom

Performance.chunkSplit is used to configure the chunk splitting strategy.

Config

The Config is the configuration that rspeedy uses.

ConfigParams

Parameters for the function exported from lynx.config.js.

CreateRspeedyOptions

The options of createRspeedy method.

CssExtract

The CssExtract controls the options of CssExtractRspackPlugin

CssExtractRspackLoaderOptions

The options of CSS extract loader.

CssExtractRspackPluginOptions

The options for CssExtractRspackPlugin

CssLoader

The CssLoader controls the options of css-loader.

CssLoaderModules

The cssLoader.modules option enables/disables the CSS Modules specification and setup basic behavior.

CssModules

The CssModules option is used for the customization of CSS Modules configurations.

Decorators

Used to configure the decorators syntax.

Dev

The Dev option is used to control the behavior related with development. Including: HMR, DevServer, etc.

DevClient

Configuration of the development client.

DistPath

Set the directory of the dist files.

EntryDescription

The EntryDescription describes a entry. It is useful when the project has multiple entries with different configuration.

ExposedAPI

The exposed API of Rspeedy. Can be used in Rsbuild plugin with api.useExposed.

Filename

The Filename determines the name of the JavaScript bundle file to be output. These bundles will be written to the directory specified by output.path.

LoadConfigOptions

The options of loadConfig.

LoadConfigResult

The result of loadConfig().

Minify

The Minify configures whether to enable code minification in the production build, or to configure minimizer options.

Output

The Output option is used to set how and where should the bundles and assets output.

Performance

The Performance option is used to optimize the build-time and runtime performance.

Resolve

The Resolve option is used to control the resolution behavior of Rspack.

Server

The Server option changes the behavior of dev-server.

Source

The Source option changes the behavior of source files.

SourceMap

The SourceMap configures whether and how to generate source-map for outputs.

Tools

The Tools options changes the behavior of various building tools.

TransformImport

The TransformImport option transforms the import paths to enable modular imports from subpaths of third-party packages, similar to the functionality provided by babel-plugin-import.

Variables

Variable

Description

rspackVersion

version

Type Aliases

Type Alias

Description

ConsoleType

The type of the console method.

CssModuleLocalsConvention

The style of exported class names.

Entry

The Entry option is used to set the entry module.

RsdoctorRspackPluginOptions

RspeedyInstance

The instance of Rspeedy.