CliPlugin[]
[]
Used to configure custom Modern.js framework CLI plugins. For information on how to create custom CLI plugins, please refer to How to Write CLI Plugins.
This option is specifically for configuring framework CLI plugins. If you need to configure other types of plugins, use the appropriate configuration method:
Use builderPlugins for Rsbuild plugins.
Use tools.bundlerChain for Rspack or webpack plugins.
Use tools.babel for Babel plugins.
Use the plugins field in runtime config for framework Runtime plugins.
Below are examples of using CLI plugins:
To use plugins from the npm registry, first install the plugins and then import them in your configuration:
To use plugins from your local repository, import them directly using a relative path:
If a plugin provides custom configuration options, pass them as parameters to the plugin function: