Skip to main content

Minification

Farm supports production minify out of box, which is automatically enabled in production by default. It can be enable or disable via the compilation.minify option.

farm.config.ts

If minify is enabled:

  • For js/ts modules, the code will be compressed and mangled, and all the blank characters will be removed.
  • For css and html modules, all spaces will be removed.
note

Farm use swc minifier under the hood, refer to compilation.minify for detailed options.

Extremely Fast Web Build Tool Written in Rust

Copyright © 2024 Farm Community. Built with Docusaurus.