> For AI agents: the complete documentation index is available at https://rspack.rs/llms.txt, the full documentation bundle is available at https://rspack.rs/llms-full.txt.

# Rspack plugins

Browse Rspack's built-in plugins by function below.

To learn how to use plugins, see the [plugin guide](https://rspack.rs/guide/features/plugin.md).

## Output and assets

- [BannerPlugin](https://rspack.rs/plugins/banner-plugin.md): Adds a banner to the beginning or end of generated chunks.
- [CopyRspackPlugin](https://rspack.rs/plugins/copy-rspack-plugin.md): Copies files or directories into the build output.
- [CssExtractRspackPlugin](https://rspack.rs/plugins/css-extract-rspack-plugin.md): Extracts CSS into standalone files as a replacement for `mini-css-extract-plugin`.
- [HtmlRspackPlugin](https://rspack.rs/plugins/html-rspack-plugin.md): Generates HTML files and injects the build's scripts and styles.
- [SubresourceIntegrityPlugin](https://rspack.rs/plugins/subresource-integrity-plugin.md): Generates integrity hashes for emitted assets and adds them to HTML and chunk-loading tags.

## Build optimization

- [CompactHashedChunkIdsPlugin](https://rspack.rs/plugins/compact-hashed-chunk-ids-plugin.md): Assigns compact, stable hash ids to chunks.
- [CompactHashedModuleIdsPlugin](https://rspack.rs/plugins/compact-hashed-module-ids-plugin.md): Assigns compact, stable hash ids to modules.
- [CssChunkingPlugin](https://rspack.rs/plugins/css-chunking-plugin.md): Splits CSS into chunks while preserving required stylesheet ordering.
- [DeterministicModuleIdsPlugin](https://rspack.rs/plugins/deterministic-module-ids-plugin.md): Assigns short numeric module ids that remain stable between builds.
- [DllPlugin](https://rspack.rs/plugins/dll-plugin.md): Creates a prebuilt DLL bundle and its manifest.
- [DllReferencePlugin](https://rspack.rs/plugins/dll-reference-plugin.md): References a DLL manifest to reuse prebuilt dependencies.
- [LightningCssMinimizerRspackPlugin](https://rspack.rs/plugins/lightning-css-minimizer-rspack-plugin.md): Minifies CSS assets with Lightning CSS.
- [LimitChunkCountPlugin](https://rspack.rs/plugins/limit-chunk-count-plugin.md): Merges chunks to keep their total count below a configured limit.
- [RuntimeChunkPlugin](https://rspack.rs/plugins/runtime-chunk-plugin.md): Controls how Rspack creates runtime chunks.
- [SplitChunksPlugin](https://rspack.rs/plugins/split-chunks-plugin.md): Splits shared or asynchronous code into chunks for better loading and caching.
- [SwcJsMinimizerRspackPlugin](https://rspack.rs/plugins/swc-js-minimizer-rspack-plugin.md): Minifies JavaScript assets with SWC.

## Modules and dependencies

- [ContextReplacementPlugin](https://rspack.rs/plugins/context-replacement-plugin.md): Narrows or replaces the modules available to dynamic `require` and `import()` contexts.
- [DefinePlugin](https://rspack.rs/plugins/define-plugin.md): Replaces variables with constant values or expressions at compile time.
- [EntryPlugin](https://rspack.rs/plugins/entry-plugin.md): Adds an entry module and entry chunk during compilation.
- [EnvironmentPlugin](https://rspack.rs/plugins/environment-plugin.md): Defines selected `process.env` values through `DefinePlugin`.
- [ExternalsPlugin](https://rspack.rs/plugins/externals-plugin.md): Leaves selected dependencies out of the bundle so they can be provided externally.
- [IgnorePlugin](https://rspack.rs/plugins/ignore-plugin.md): Prevents matching `import` or `require` requests from producing modules.
- [JavascriptModulesPlugin](https://rspack.rs/plugins/javascript-modules-plugin.md): Handles JavaScript module bundling and exposes compilation hooks for customizing rendering and chunk hashes.
- [ModuleFederationPlugin](https://rspack.rs/plugins/module-federation-plugin.md): Enables Module Federation 1.5 in Rspack.
- [ModuleFederationPluginV1](https://rspack.rs/plugins/module-federation-plugin-v1.md): Provides webpack-compatible Module Federation 1.0 behavior.
- [NormalModuleReplacementPlugin](https://rspack.rs/plugins/normal-module-replacement-plugin.md): Replaces matching module requests with another resource.
- [ProvidePlugin](https://rspack.rs/plugins/provide-plugin.md): Automatically imports modules when configured identifiers are used.
- [VirtualModulesPlugin](https://rspack.rs/plugins/virtual-modules-plugin.md): Creates, updates, and deletes in-memory modules that behave like files.

## Development and debugging

- [CaseSensitivePlugin](https://rspack.rs/plugins/case-sensitive-plugin.md): Warns when module request casing conflicts with paths on the file system.
- [CircularCheckRspackPlugin](https://rspack.rs/plugins/circular-check-rspack-plugin.md): Reports circular imports found in the module graph.
- [EvalSourceMapDevToolPlugin](https://rspack.rs/plugins/eval-source-map-dev-tool-plugin.md): Provides fine-grained source map generation using eval-based mappings.
- [HotModuleReplacementPlugin](https://rspack.rs/plugins/hot-module-replacement-plugin.md): Enables hot module replacement during development.
- [NoEmitOnErrorsPlugin](https://rspack.rs/plugins/no-emit-on-errors-plugin.md): Prevents assets from being emitted when compilation errors occur.
- [ProgressPlugin](https://rspack.rs/plugins/progress-plugin.md): Reports and customizes compilation progress.
- [SourceMapDevToolPlugin](https://rspack.rs/plugins/source-map-dev-tool-plugin.md): Provides fine-grained control over source map generation.

## Reference

- [Low-level plugins](https://rspack.rs/plugins/low-level-plugins.md): Catalogs publicly exposed building blocks for target presets, runtime templates, child compilers, and higher-level plugins.
- [Community plugin compatibility](https://rspack.rs/plugins/community-plugin-compatibility.md): Lists compatibility results for common webpack community plugins.
- [webpack plugin compatibility](https://rspack.rs/plugins/webpack-built-in-plugin-support.md): Summarizes Rspack's compatibility with webpack built-in plugins and selected internal 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 [Community plugin compatibility](https://rspack.rs/plugins/community-plugin-compatibility.md) 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](https://github.com/rstackjs/awesome-rstack).

Welcome to add the plugins you developed to this repository.

## Deprecated

- [CircularDependencyRspackPlugin](https://rspack.rs/plugins/circular-dependency-rspack-plugin.md): Detects circular dependencies and is deprecated in favor of `CircularCheckRspackPlugin`.
