Bundleless means that each source file is compiled and built separately, which can be understood as the process of code conversion of source files only. To skip the preprocessing of .less/.scss files, you need to:
source.entry to remove .less/.scss files from the entry.output.copy to copy .less/.scss files to the output directory.redirect.style.extension to false to disable the redirect behavior for the import path of .less/.scss files.Below is an example of skipping the .scss file processing. All .scss files in src will be copied to the output directory and retained with consistent relative paths.
By default, Rslib uses SWC to remove comments. The corresponding SWC jsc.minify.format configuration is
This will only preserve some legal comments and annotations. If you want to preserve all comments, you can refer to the following configuration
Compressing code can reduce the output size and improve loading speed, but the compressed code is less readable and harder to debug. If you want to preserve code readability, you can keep variable names and disable compression to facilitate debugging. Refer to web-infra-dev/rsbuild#966.