PageSourceSearch

https://farm-fe.github.io/assets/js/a58ce96b.dad869ef.js

js farm-fe.github.io collected 2026-10-03 09:12:20 UTC 3,807 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfarm_docs=self.webpackChunkfarm_docs||[]).push([[4840],{4331:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>i});var o=r(758);const s={},t=o.createContext(s);function a(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(t.Provider,{value:n},e.children)}},9536:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>t,metadata:()=>i,toc:()=>l});var o=r(6070),s=r(4331);const t={},a="Source Map",i={id:"features/sourcemap",title:"Source Map",description:"Farm supports Source Map, which is automatically enabled by default. It can be enable or disable sourcemap via the compilation.sourcemap option.",source:"@site/versioned_docs/version-0.x/features/sourcemap.md",sourceDirName:"features",slug:"/features/sourcemap",permalink:"/docs/0.x/features/sourcemap",draft:!1,unlisted:!1,editUrl:"https://github.com/farm-fe/farm-fe.github.io/tree/main/versioned_docs/version-0.x/features/sourcemap.md",tags:[],version:"0.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Partial Bundling",permalink:"/docs/0.x/features/partial-bundling"},next:{title:"Tree Shake",permalink:"/docs/0.x/features/tree-shake"}},c={},l=[];function d(e){const n={admonition:"admonition",code:"code",h1:"h1",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"source-map",children:"Source Map"}),"\n",(0,o.jsxs)(n.p,{children:["Farm supports Source Map, which is automatically enabled by default. It can be enable or disable sourcemap via the ",(0,o.jsx)(n.code,{children:"compilation.sourcemap"})," option."]}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["Farm will not generate sourcemap for files under node_modules by default, if you want to generate sourcemap for files under node_modules, configure ",(0,o.jsx)(n.code,{children:"compilation.sourcemap"})," to ",(0,o.jsx)(n.code,{children:"all"}),"."]})}),"\n",(0,o.jsxs)(n.p,{children:["Using ",(0,o.jsx)(n.code,{children:"compilation.sourcemap"})," to configuring sourcemap generation:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-ts",metastring:'title="farm.config.ts"',children:"export default {\n   compilation: {\n     sourcemap: 'all', // generate sourcemap for modules under node_modules\n   },\n};\n"})}),"\n",(0,o.jsx)(n.p,{children:"All options are as below:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"true"})}),": Only generate sourcemap for files not under ",(0,o.jsx)(n.code,{children:"node_modules"}),", and generate a separate sourcemap file"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"false"})}),": disable sourcemap"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"inline"})}),": Only generate sourcemap for files not under ",(0,o.jsx)(n.code,{children:"node_modules"}),", and inline sourcemap into the product, do not generate a separate file"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"all"})}),": generate sourcemap for all files, and generate a separate sourcemap file"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"all-inline"})}),": Generate sourcemaps for all files, and inline sourcemaps into the product, do not generate separate files"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}}}]);

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.