website/docs/en/plugins/webpack/dll-plugin.mdx
import { Table } from '@builtIns'; import WebpackLicense from '@components/WebpackLicense';
<WebpackLicense from="https://webpack.js.org/plugins/dll-plugin/" />The DllPlugin is used in a separate rspack configuration exclusively to create a dll-only-bundle.
type DllPluginOptions = {
context?: string;
entryOnly?: boolean;
format?: boolean;
name?: string;
path: string;
type?: string;
};
new rspack.DllPlugin({
path: path.resolve(__dirname, 'manifest.json'),
name: '[name]_dll_lib',
});
The Plugin will create a manifest.json which is written to the given path.
It contains mappings from require and import requests to module ids.
The manifest.json is used by the DllReferencePlugin
Combine this plugin with output.library options to expose the dll function.