Rspack supports code splitting, which allows splitting the code into other chunks. You have the full control about size and number of generated assets, which allow you to gain performance improvements in loading time.
See Code splitting for more details.
Rspack supports tree shaking, a terminology widely used within the JavaScript ecosystem defined as the removal of unused code, commonly referred to as "dead code".
See Tree shaking for more details.
During the production build, Rspack uses the built-in minimizer to minify JavaScript and CSS code by default.
If you need to customize the minification options, you can use SwcJsMinimizerRspackPlugin and LightningCssMinimizerRspackPlugin for configuration.
If the built-in minimizer cannot meet your needs, you can also use optimization.minimizer to set custom minimizers.