Home > @lynx-js/rspeedy > Minify > css

Minify.css property

Whether enable the CSS minification.

Signature:

css?: boolean | undefined;

Remarks

When building for production, Rsbuild enables Rspack's built-in LightningCssMinimizerRspackPlugin plugin to minify CSS assets for better transmission efficiency.

You can use @rsbuild/plugin-css-minimizer to customize the CSS minimizer, switching to cssnano or other CSS minimizer.

Example

  • Disable the CSS minification.
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
  output: {
    minify: {
      css: false,
    },
  },
})
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.