boolean
true
Configure whether to enable gzip compression for static assets served by the dev server or preview server.
To disable the gzip compression, set compress
to false
:
Rsbuild dev server uses zlib.constants.Z_BEST_SPEED as the default compression level, which provides the best compression performance. The preview server sets level
to 6
by default.
Note that in actual production environments, web servers like Nginx or Apache are commonly used, which may utilize different compression levels. Therefore, you might observe differences between the file sizes after gzip compression in your local environment compared to production.