Rspack plugins
Browse all documented Rspack plugins by function below.
To learn how to use plugins, see the plugin guide.
Output and assets
- BannerPlugin: Adds a banner to the beginning or end of generated chunks.
- CopyRspackPlugin: Copies files or directories into the build output.
- CssExtractRspackPlugin: Extracts CSS into standalone files as a replacement for
mini-css-extract-plugin. - HtmlRspackPlugin: Generates HTML files and injects the build's scripts and styles.
- SubresourceIntegrityPlugin: Generates integrity hashes for emitted assets and adds them to HTML and chunk-loading tags.
Build optimization
- CompatHashedChunkIdsPlugin: Assigns compact, stable hash ids to chunks.
- CompatHashedModuleIdsPlugin: Assigns compact, stable hash ids to modules.
- CssChunkingPlugin: Splits CSS into chunks while preserving required stylesheet ordering.
- DeterministicModuleIdsPlugin: Assigns short numeric module ids that remain stable between builds.
- DllPlugin: Creates a prebuilt DLL bundle and its manifest.
- DllReferencePlugin: References a DLL manifest to reuse prebuilt dependencies.
- LightningCssMinimizerRspackPlugin: Minifies CSS assets with Lightning CSS.
- LimitChunkCountPlugin: Merges chunks to keep their total count below a configured limit.
- RuntimeChunkPlugin: Controls how Rspack creates runtime chunks.
- SplitChunksPlugin: Splits shared or asynchronous code into chunks for better loading and caching.
- SwcJsMinimizerRspackPlugin: Minifies JavaScript assets with SWC.
Modules and dependencies
- ContextReplacementPlugin: Narrows or replaces the modules available to dynamic
requireandimport()contexts. - DefinePlugin: Replaces variables with constant values or expressions at compile time.
- EntryPlugin: Adds an entry module and entry chunk during compilation.
- EnvironmentPlugin: Defines selected
process.envvalues throughDefinePlugin. - ExternalsPlugin: Leaves selected dependencies out of the bundle so they can be provided externally.
- IgnorePlugin: Prevents matching
importorrequirerequests from producing modules. - JavascriptModulesPlugin: Handles JavaScript module bundling and exposes compilation hooks for customizing rendering and chunk hashes.
- ModuleFederationPlugin: Enables Module Federation 1.5 in Rspack.
- ModuleFederationPluginV1: Provides webpack-compatible Module Federation 1.0 behavior.
- NormalModuleReplacementPlugin: Replaces matching module requests with another resource.
- ProvidePlugin: Automatically imports modules when configured identifiers are used.
- TreeShakingSharedPlugin: Performs on-demand builds and export optimization for Module Federation shared dependencies.
- VirtualModulesPlugin: Creates, updates, and deletes in-memory modules that behave like files.
Development and debugging
- CaseSensitivePlugin: Warns when module request casing conflicts with paths on the file system.
- CircularCheckRspackPlugin: Reports circular imports found in the module graph.
- EvalSourceMapDevToolPlugin: Provides fine-grained source map generation using eval-based mappings.
- HotModuleReplacementPlugin: Enables hot module replacement during development.
- NoEmitOnErrorsPlugin: Prevents assets from being emitted when compilation errors occur.
- ProgressPlugin: Reports and customizes compilation progress.
- SourceMapDevToolPlugin: Provides fine-grained control over source map generation.
Targets and runtime
- ElectronTargetPlugin: Externalizes Electron built-in modules for Electron targets.
- EnableChunkLoadingPlugin: Enables a chunk-loading type and its required runtime modules.
- EnableLibraryPlugin: Enables output for a specified library type.
- EnableWasmLoadingPlugin: Enables a WebAssembly loading type and its required runtime modules.
- JsonpTemplatePlugin: Configures browser builds to use JSONP-style chunk loading.
- NodeTargetPlugin: Externalizes Node.js built-in modules for Node targets.
- NodeTemplatePlugin: Configures Node.js chunk format and loading behavior.
- WebWorkerTemplatePlugin: Configures Web Worker builds and
importScripts-based chunk loading.
Reference
- Internal plugins: Catalogs low-level plugins that Rspack applies internally for custom compiler development and inspection.
- webpack built-in plugin support: Summarizes Rspack's support for webpack built-in plugins.
For third-party plugins, see the plugin compatibility list and awesome-rstack.
Deprecated
- CircularDependencyRspackPlugin: Detects circular dependencies and is deprecated in favor of
CircularCheckRspackPlugin.

