If you need to configure the on-demand import of the component library, you can configure it through source.transformImport, which is equivalent to babel-plugin-import.
For the sake of compilation performance, Rsbuild will not perform ESLint verification during the compilation process by default. If you need this function, you can manually install and register the eslint-webpack-plugin in the community -contrib/eslint-webpack-plugin).
The sample code to register the plugin is as follows:
For more detailed usage, please refer to the eslint-webpack-plugin documentation.
If you need to upload static assets such as JS and CSS to CDN for use, you can set the URL prefix of static assets through the output.assetPrefix configuration.
When the production environment is built, we can remove the console
from the code, so as to avoid the log of the development environment being output to the production environment.
Rsbuild provides a configuration option to remove console by default, please see performance.removeConsole.
By using the Rsbuild debug mode, you can view the Rspack configuration generated by Rsbuild.
You can enable the debug mode of Rsbuild by adding the DEBUG=rsbuild
environment variable when performing the build. In this mode, the internally generated Rspack configuration will be outputted to the "dist" directory.
By default, Rsbuild will print all error and warning logs generated by the build process.
If a large number of warning logs are generated due to the three-party package, it cannot be processed temporarily, and you want to ignore it. Specific warning logs can be ignored through the ignoreWarnings
configuration provided by Rspack.
For details, please refer to: ignoreWarnings.