Rspack plugins
Browse Rspack's built-in 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
- CompactHashedChunkIdsPlugin: Assigns compact, stable hash ids to chunks.
- CompactHashedModuleIdsPlugin: 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.
- 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.
Reference
- Low-level plugins: Catalogs publicly exposed building blocks for target presets, runtime templates, child compilers, and higher-level plugins.
- webpack built-in plugin support: Summarizes Rspack's support for webpack built-in plugins.
Community plugins
Rspack strives to maintain compatibility with the webpack plugin ecosystem to leverage the excellent features that have been accumulated and validated by the community.
Please refer to the Plugin compatibility list to access a list of webpack plugins that have passed our compatibility tests.
You can also check out the community Rspack plugins at awesome-rstack.
Welcome to add the plugins you developed to this repository.
Deprecated
- CircularDependencyRspackPlugin: Detects circular dependencies and is deprecated in favor of
CircularCheckRspackPlugin.

