PageSourceSearch

https://farm-nightly.netlify.app/assets/js/bc246e70.5850196d.js

js farm-nightly.netlify.app collected 2026-10-03 10:45:49 UTC 2,635 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfarm_docs=self.webpackChunkfarm_docs||[]).push([[9938],{36103:(i,e,n)=>{n.r(e),n.d(e,{assets:()=>r,contentTitle:()=>d,default:()=>m,frontMatter:()=>t,metadata:()=>c,toc:()=>s});var o=n(49214),a=n(36906);const t={},d="Minification",c={id:"advanced/minification",title:"Minification",description:"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.",source:"@site/docs/advanced/minification.md",sourceDirName:"advanced",slug:"/advanced/minification",permalink:"/docs/advanced/minification",draft:!1,unlisted:!1,editUrl:"https://github.com/farm-fe/farm-fe.github.io/tree/main/docs/advanced/minification.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Tree Shake",permalink:"/docs/advanced/tree-shake"},next:{title:"Syntax Downgrade and Polyfill",permalink:"/docs/advanced/polyfill"}},r={},s=[];function l(i){const e={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...i.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.header,{children:(0,o.jsx)(e.h1,{id:"minification",children:"Minification"})}),"\n",(0,o.jsxs)(e.p,{children:["Farm supports production minify out of box, which is automatically enabled ",(0,o.jsx)(e.code,{children:"in production"})," by default. It can be enable or disable via the ",(0,o.jsx)(e.a,{href:"/docs/config/compilation-options#minify",children:(0,o.jsx)(e.code,{children:"compilation.minify"})})," option."]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-ts",metastring:'title="farm.config.ts"',children:"export default {\n   compilation: {\n    // enable minification for both development and production\n    minify: true\n   },\n};\n"})}),"\n",(0,o.jsx)(e.p,{children:"If minify is enabled:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["For js/ts modules, the code will be ",(0,o.jsx)(e.code,{children:"compressed"})," and ",(0,o.jsx)(e.code,{children:"mangled"}),", and all the blank characters will be removed."]}),"\n",(0,o.jsx)(e.li,{children:"For css and html modules, all spaces will be removed."}),"\n"]}),"\n",(0,o.jsx)(e.admonition,{type:"note",children:(0,o.jsxs)(e.p,{children:["Farm use swc minifier under the hood, refer to ",(0,o.jsx)(e.a,{href:"/docs/config/compilation-options#minify",children:"compilation.minify"})," for detailed options."]})})]})}function m(i={}){const{wrapper:e}={...(0,a.R)(),...i.components};return e?(0,o.jsx)(e,{...i,children:(0,o.jsx)(l,{...i})}):l(i)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.