Webpack plugin, which abstracts configuration of other Re.Pack's plugin to make Webpack config more readable.
example
Usage in Webpack config (ESM):
Internally, RepackPlugin
configures the following plugins:
webpack.DefinePlugin
with __DEV__
globalwebpack.SourceMapDevToolPlugin
RepackPlugin
provides a sensible defaults, but can be customized to some extent.
If you need more control, it's recommended to remove RepackPlugin
and use other plugins
directly, eg:
• new RepackPlugin(config
)
Constructs new RepackPlugin
.
Name | Type | Description |
---|---|---|
config |
RepackPluginConfig |
Plugin configuration options. |
packages/repack/src/webpack/plugins/RepackPlugin.ts:116
▸ apply(compiler
): void
Apply the plugin.
Name | Type | Description |
---|---|---|
compiler |
Compiler |
Webpack compiler instance. |
void