@modern-js/module-tools-docs 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +144 -0
- package/docs/.island/config.ts +245 -0
- package/docs/.island/dist/404.html +41 -0
- package/docs/.island/dist/assets/before-getting-started.1b82b538.js +87 -0
- package/docs/.island/dist/assets/before-getting-started.582a31cc.js +87 -0
- package/docs/.island/dist/assets/build-config.72eb0918.js +804 -0
- package/docs/.island/dist/assets/build-config.d8bb1658.js +809 -0
- package/docs/.island/dist/assets/build-preset.96805d7d.js +256 -0
- package/docs/.island/dist/assets/build-preset.c20dcd40.js +256 -0
- package/docs/.island/dist/assets/build-your-ui.7f349247.js +2 -0
- package/docs/.island/dist/assets/build-your-ui.a8361604.js +2 -0
- package/docs/.island/dist/assets/command-preview.2d45fc82.js +264 -0
- package/docs/.island/dist/assets/command-preview.dc51b953.js +264 -0
- package/docs/.island/dist/assets/components.esm.03560353.js +9 -0
- package/docs/.island/dist/assets/design-system.86694ff5.js +1254 -0
- package/docs/.island/dist/assets/design-system.c4745cce.js +639 -0
- package/docs/.island/dist/assets/dev.1d326a37.js +37 -0
- package/docs/.island/dist/assets/dev.1fd06000.js +37 -0
- package/docs/.island/dist/assets/down.f35427d3.svg +1 -0
- package/docs/.island/dist/assets/extension.12299fd6.js +2 -0
- package/docs/.island/dist/assets/extension.96dc63a4.js +2 -0
- package/docs/.island/dist/assets/getting-started.40e9218d.js +117 -0
- package/docs/.island/dist/assets/getting-started.b1ed3f10.js +114 -0
- package/docs/.island/dist/assets/github.3bf8ccee.svg +1 -0
- package/docs/.island/dist/assets/index.2b2347ea.js +33 -0
- package/docs/.island/dist/assets/index.6cef6f5f.js +4 -0
- package/docs/.island/dist/assets/index.cb118238.js +36 -0
- package/docs/.island/dist/assets/index.ccb6ce27.js +4 -0
- package/docs/.island/dist/assets/island_inject.11a12ecc.js +1 -0
- package/docs/.island/dist/assets/island_inject.b13deaee.js +1 -0
- package/docs/.island/dist/assets/loading.8c9bb911.svg +1 -0
- package/docs/.island/dist/assets/modify-output-product.7f6bff35.js +100 -0
- package/docs/.island/dist/assets/modify-output-product.b91eff1f.js +100 -0
- package/docs/.island/dist/assets/moon.6b705924.svg +3 -0
- package/docs/.island/dist/assets/plugin.895932d8.js +42 -0
- package/docs/.island/dist/assets/plugin.d2fbc531.js +42 -0
- package/docs/.island/dist/assets/publish-your-project.21b8309f.js +164 -0
- package/docs/.island/dist/assets/publish-your-project.8d398b17.js +166 -0
- package/docs/.island/dist/assets/right.89674cd7.svg +1 -0
- package/docs/.island/dist/assets/search.0aea6901.svg +1 -0
- package/docs/.island/dist/assets/search.1c85d17c.js +3 -0
- package/docs/.island/dist/assets/search.484eca11.js +222 -0
- package/docs/.island/dist/assets/search.54fca8d0.js +3 -0
- package/docs/.island/dist/assets/style.09015a4b.css +1 -0
- package/docs/.island/dist/assets/style.2e5f7bc2.css +1970 -0
- package/docs/.island/dist/assets/sun.841dac10.svg +11 -0
- package/docs/.island/dist/assets/test-your-project.18bd4582.js +190 -0
- package/docs/.island/dist/assets/test-your-project.f53bebf7.js +190 -0
- package/docs/.island/dist/assets/test.0da1f99f.js +67 -0
- package/docs/.island/dist/assets/test.0e81f002.js +66 -0
- package/docs/.island/dist/assets/translator.b1077c44.svg +1 -0
- package/docs/.island/dist/assets/use-micro-generator.7d9e4016.js +60 -0
- package/docs/.island/dist/assets/use-micro-generator.db5520c1.js +60 -0
- package/docs/.island/dist/assets/using-storybook.57ea6b77.js +260 -0
- package/docs/.island/dist/assets/using-storybook.a2212f2e.js +260 -0
- package/docs/.island/dist/assets/welcome.0449a9c8.js +13 -0
- package/docs/.island/dist/assets/welcome.a8448931.js +13 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.6ae8c0e3.js +26 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.c9a45cbd.js +26 -0
- package/docs/.island/dist/chunk-COLCRJ2V.js +1 -0
- package/docs/.island/dist/chunk-K5FMOYDC.js +10 -0
- package/docs/.island/dist/chunk-WE42KMYS.js +26 -0
- package/docs/.island/dist/client-entry.js +3 -0
- package/docs/.island/dist/en/api/build-config.html +344 -0
- package/docs/.island/dist/en/api/build-preset.html +82 -0
- package/docs/.island/dist/en/api/design-system.html +155 -0
- package/docs/.island/dist/en/api/dev.html +45 -0
- package/docs/.island/dist/en/api/index.html +41 -0
- package/docs/.island/dist/en/api/plugin.html +48 -0
- package/docs/.island/dist/en/api/test.html +58 -0
- package/docs/.island/dist/en/guide/before-getting-started.html +127 -0
- package/docs/.island/dist/en/guide/build-your-ui.html +41 -0
- package/docs/.island/dist/en/guide/command-preview.html +100 -0
- package/docs/.island/dist/en/guide/extension.html +41 -0
- package/docs/.island/dist/en/guide/getting-started.html +76 -0
- package/docs/.island/dist/en/guide/modify-output-product.html +140 -0
- package/docs/.island/dist/en/guide/publish-your-project.html +91 -0
- package/docs/.island/dist/en/guide/test-your-project.html +72 -0
- package/docs/.island/dist/en/guide/use-micro-generator.html +65 -0
- package/docs/.island/dist/en/guide/using-storybook.html +113 -0
- package/docs/.island/dist/en/guide/welcome.html +53 -0
- package/docs/.island/dist/en/guide/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/en/index.html +42 -0
- package/docs/.island/dist/react-dom.js +1 -0
- package/docs/.island/dist/react-dom_client.js +1 -0
- package/docs/.island/dist/react.js +1 -0
- package/docs/.island/dist/react_jsx-runtime.js +10 -0
- package/docs/.island/dist/ssr-manifest.json +57 -0
- package/docs/.island/dist/test-result.png +0 -0
- package/docs/.island/dist/why-module-solution.png +0 -0
- package/docs/.island/dist/zh/api/build-config.html +347 -0
- package/docs/.island/dist/zh/api/build-preset.html +82 -0
- package/docs/.island/dist/zh/api/design-system.html +149 -0
- package/docs/.island/dist/zh/api/dev.html +46 -0
- package/docs/.island/dist/zh/api/index.html +41 -0
- package/docs/.island/dist/zh/api/plugin.html +48 -0
- package/docs/.island/dist/zh/api/test.html +59 -0
- package/docs/.island/dist/zh/guide/before-getting-started.html +127 -0
- package/docs/.island/dist/zh/guide/build-your-ui.html +41 -0
- package/docs/.island/dist/zh/guide/command-preview.html +100 -0
- package/docs/.island/dist/zh/guide/extension.html +41 -0
- package/docs/.island/dist/zh/guide/getting-started.html +79 -0
- package/docs/.island/dist/zh/guide/modify-output-product.html +140 -0
- package/docs/.island/dist/zh/guide/publish-your-project.html +92 -0
- package/docs/.island/dist/zh/guide/test-your-project.html +72 -0
- package/docs/.island/dist/zh/guide/use-micro-generator.html +65 -0
- package/docs/.island/dist/zh/guide/using-storybook.html +114 -0
- package/docs/.island/dist/zh/guide/welcome.html +53 -0
- package/docs/.island/dist/zh/guide/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/zh/index.html +42 -0
- package/docs/.island/index.html +39 -0
- package/docs/.island/styles/index.css +10 -0
- package/docs/en/api/build-config.md +501 -0
- package/docs/en/api/build-preset.md +214 -0
- package/docs/en/api/design-system.md +524 -0
- package/docs/en/api/dev.md +32 -0
- package/docs/en/api/index.md +3 -0
- package/docs/en/api/plugin.md +34 -0
- package/docs/en/api/test.md +48 -0
- package/docs/en/guide/advance/asset.mdx +132 -0
- package/docs/en/guide/advance/build-umd.mdx +241 -0
- package/docs/en/guide/advance/copy.md +235 -0
- package/docs/en/guide/advance/external-dependency.mdx +125 -0
- package/docs/en/guide/advance/in-depth-about-build.md +266 -0
- package/docs/en/guide/advance/in-depth-about-dev-command.md +22 -0
- package/docs/en/guide/basic/before-getting-started.md +187 -0
- package/docs/en/guide/basic/command-preview.md +204 -0
- package/docs/en/guide/basic/modify-output-product.md +145 -0
- package/docs/en/guide/basic/publish-your-project.md +115 -0
- package/docs/en/guide/basic/test-your-project.mdx +158 -0
- package/docs/en/guide/basic/use-micro-generator.md +35 -0
- package/docs/en/guide/basic/using-storybook.mdx +187 -0
- package/docs/en/guide/intro/getting-started.md +78 -0
- package/docs/en/guide/intro/welcome.md +14 -0
- package/docs/en/guide/intro/why-module-engineering-solution.md +17 -0
- package/docs/en/index.md +35 -0
- package/docs/public/test-result.png +0 -0
- package/docs/public/why-module-solution.png +0 -0
- package/docs/zh/api/build-config.md +570 -0
- package/docs/zh/api/build-preset.md +220 -0
- package/docs/zh/api/design-system.md +1147 -0
- package/docs/zh/api/dev.md +33 -0
- package/docs/zh/api/index.md +3 -0
- package/docs/zh/api/plugins.md +108 -0
- package/docs/zh/api/testing.md +52 -0
- package/docs/zh/guide/advance/asset.mdx +132 -0
- package/docs/zh/guide/advance/build-umd.mdx +232 -0
- package/docs/zh/guide/advance/copy.md +235 -0
- package/docs/zh/guide/advance/external-dependency.mdx +125 -0
- package/docs/zh/guide/advance/in-depth-about-build.md +267 -0
- package/docs/zh/guide/advance/in-depth-about-dev-command.md +26 -0
- package/docs/zh/guide/basic/before-getting-started.md +187 -0
- package/docs/zh/guide/basic/command-preview.md +204 -0
- package/docs/zh/guide/basic/modify-output-product.md +144 -0
- package/docs/zh/guide/basic/publish-your-project.md +112 -0
- package/docs/zh/guide/basic/test-your-project.mdx +158 -0
- package/docs/zh/guide/basic/use-micro-generator.md +35 -0
- package/docs/zh/guide/basic/using-storybook.mdx +186 -0
- package/docs/zh/guide/intro/getting-started.md +78 -0
- package/docs/zh/guide/intro/welcome.md +14 -0
- package/docs/zh/guide/intro/why-module-engineering-solution.md +17 -0
- package/docs/zh/index.md +29 -0
- package/package.json +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as f from"react";import d,{useState as y,useEffect as G,useRef as U,useCallback as pe,lazy as _t,forwardRef as wt,createContext as yt,Fragment as Et}from"react";import{jsx as n,jsxs as h,Fragment as xt}from"react/jsx-runtime";var H=function(e){return function(t){return Math.pow(t,e)}},q=function(e){return function(t){return 1-Math.abs(Math.pow(t-1,e))}},J=function(e){return function(t){return t<.5?H(e)(t*2)/2:q(e)(t*2-1)/2+.5}},It=function(e){return e},Rt=H(2),zt=q(2),Pt=J(2),St=H(3),Tt=q(3),At=J(3),Lt=H(4),Ot=q(4),kt=J(4),Mt=H(5),Ct=q(5),Nt=J(5),jt=function(e){return 1+Math.sin(Math.PI/2*e-Math.PI/2)},Dt=function(e){return Math.sin(Math.PI/2*e)},Vt=function(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2},ce=function(e){var t=7.5625,o=2.75;return e<1/o?t*e*e:e<2/o?(e-=1.5/o,t*e*e+.75):e<2.5/o?(e-=2.25/o,t*e*e+.9375):(e-=2.625/o,t*e*e+.984375)},ct=function(e){return 1-ce(1-e)},Ut=function(e){return e<.5?ct(e*2)*.5:ce(e*2-1)*.5+.5},$t=Object.freeze({linear:It,quadIn:Rt,quadOut:zt,quadInOut:Pt,cubicIn:St,cubicOut:Tt,cubicInOut:At,quartIn:Lt,quartOut:Ot,quartInOut:kt,quintIn:Mt,quintOut:Ct,quintInOut:Nt,sineIn:jt,sineOut:Dt,sineInOut:Vt,bounceOut:ce,bounceIn:ct,bounceInOut:Ut}),ee=function(t){var o=t.from,r=t.to,i=t.duration,a=t.delay,c=t.easing,l=t.onStart,p=t.onUpdate,v=t.onFinish;for(var b in o)r[b]===void 0&&(r[b]=o[b]);for(var g in r)o[g]===void 0&&(o[g]=r[g]);this.from=o,this.to=r,this.duration=i||500,this.delay=a||0,this.easing=c||"linear",this.onStart=l,this.onUpdate=p||function(){},this.onFinish=v,this.startTime=Date.now()+this.delay,this.started=!1,this.finished=!1,this.timer=null,this.keys={}};ee.prototype.update=function(){if(this.time=Date.now(),!(this.time<this.startTime)&&!this.finished){if(this.elapsed===this.duration){this.finished||(this.finished=!0,this.onFinish&&this.onFinish(this.keys));return}this.elapsed=this.time-this.startTime,this.elapsed=this.elapsed>this.duration?this.duration:this.elapsed;for(var t in this.to)this.keys[t]=this.from[t]+(this.to[t]-this.from[t])*$t[this.easing](this.elapsed/this.duration);this.started||(this.onStart&&this.onStart(this.keys),this.started=!0),this.onUpdate(this.keys)}};ee.prototype.start=function(){var t=this;this.startTime=Date.now()+this.delay;var o=function(){t.update(),t.timer=requestAnimationFrame(o),t.finished&&(cancelAnimationFrame(t.timer),t.timer=null)};o()};ee.prototype.stop=function(){cancelAnimationFrame(this.timer),this.timer=null};var Bt=typeof global=="object"&&global&&global.Object===Object&&global;const Ht=Bt;var qt=typeof self=="object"&&self&&self.Object===Object&&self,Wt=Ht||qt||Function("return this")();const lt=Wt;var Ft=lt.Symbol;const Y=Ft;var dt=Object.prototype,Gt=dt.hasOwnProperty,Yt=dt.toString,V=Y?Y.toStringTag:void 0;function Kt(e){var t=Gt.call(e,V),o=e[V];try{e[V]=void 0;var r=!0}catch{}var i=Yt.call(e);return r&&(t?e[V]=o:delete e[V]),i}var Xt=Object.prototype,Zt=Xt.toString;function Qt(e){return Zt.call(e)}var Jt="[object Null]",en="[object Undefined]",fe=Y?Y.toStringTag:void 0;function tn(e){return e==null?e===void 0?en:Jt:fe&&fe in Object(e)?Kt(e):Qt(e)}function nn(e){return e!=null&&typeof e=="object"}var on="[object Symbol]";function rn(e){return typeof e=="symbol"||nn(e)&&tn(e)==on}var an=/\s/;function sn(e){for(var t=e.length;t--&&an.test(e.charAt(t)););return t}var cn=/^\s+/;function ln(e){return e&&e.slice(0,sn(e)+1).replace(cn,"")}function K(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ve=0/0,dn=/^[-+]0x[0-9a-f]+$/i,un=/^0b[01]+$/i,mn=/^0o[0-7]+$/i,hn=parseInt;function ge(e){if(typeof e=="number")return e;if(rn(e))return ve;if(K(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=K(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ln(e);var o=un.test(e);return o||mn.test(e)?hn(e.slice(2),o?2:8):dn.test(e)?ve:+e}var pn=function(){return lt.Date.now()};const ne=pn;var fn="Expected a function",vn=Math.max,gn=Math.min;function bn(e,t,o){var r,i,a,c,l,p,v=0,b=!1,g=!1,E=!0;if(typeof e!="function")throw new TypeError(fn);t=ge(t)||0,K(o)&&(b=!!o.leading,g="maxWait"in o,a=g?vn(ge(o.maxWait)||0,t):a,E="trailing"in o?!!o.trailing:E);function I(m){var _=r,P=i;return r=i=void 0,v=m,c=e.apply(P,_),c}function x(m){return v=m,l=setTimeout(w,t),b?I(m):c}function k(m){var _=m-p,P=m-v,he=t-_;return g?gn(he,a-P):he}function R(m){var _=m-p,P=m-v;return p===void 0||_>=t||_<0||g&&P>=a}function w(){var m=ne();if(R(m))return z(m);l=setTimeout(w,k(m))}function z(m){return l=void 0,E&&r?I(m):(r=i=void 0,c)}function te(){l!==void 0&&clearTimeout(l),v=0,r=p=i=l=void 0}function j(){return l===void 0?c:z(ne())}function D(){var m=ne(),_=R(m);if(r=arguments,i=this,p=m,_){if(l===void 0)return x(p);if(g)return clearTimeout(l),l=setTimeout(w,t),I(p)}return l===void 0&&(l=setTimeout(w,t)),c}return D.cancel=te,D.flush=j,D}var _n="Expected a function";function wn(e,t,o){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(_n);return K(o)&&(r="leading"in o?!!o.leading:r,i="trailing"in o?!!o.trailing:i),bn(e,t,{leading:r,maxWait:t,trailing:i})}const be=e=>typeof e=="object";function yn({backTop:e}){var p,v,b;const t=be(e)?!0:e!=null?e:!0;let o=200,r=500,i="quadIn";be(e)&&(o=(p=e.visibleHeight)!=null?p:o,r=(v=e.duration)!=null?v:r,i=(b=e.animation)!=null?b:i);const a=()=>{const g=document.documentElement,E=g.scrollTop;new ee({from:{scrollTop:E},to:{scrollTop:0},easing:i,duration:r,onUpdate:x=>{g.scrollTop=Number(x==null?void 0:x.scrollTop)}}).start()},[c,l]=y(!1);return G(()=>{const g=wn(()=>{const E=document.documentElement.scrollTop;l(E>=o)},500);return document.addEventListener("scroll",g),()=>{g.cancel(),document.removeEventListener("scroll",g)}}),t&&c?n("div",{className:"fixed bottom-10 right-30 z-10",display:"none md:block",onClick:a,children:n("button",{className:"w-10 h-10 rounded-full duration-300",style:{backgroundColor:"var(--island-c-bg)"},color:"gray hover:gray-500",bg:"~ gray-200 hover:gray-300",shadow:"sm hover:md",children:n("div",{flex:"~ center",children:n("div",{className:"i-carbon-chevron-up",text:"xl"})})})}):null}const En="modulepreload",xn=function(e){return"/"+e},_e={},s=function(t,o,r){return!o||o.length===0?t():Promise.all(o.map(i=>{if(i=xn(i),i in _e)return;_e[i]=!0;const a=i.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${c}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":En,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((p,v)=>{l.addEventListener("load",p),l.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},In="_searchInput_y03a3_1",Rn="_searchCommand_y03a3_7",zn="_focus_y03a3_14",oe={searchInput:In,searchCommand:Rn,focus:zn},Pn=e=>f.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",...e},f.createElement("path",{fill:"#888888",d:"m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9Z"})),Sn=e=>f.createElement("svg",{width:32,height:32,viewBox:"0 0 24 24",...e},f.createElement("g",{fill:"none",stroke:"var(--island-c-brand)",strokeLinecap:"round",strokeWidth:2},f.createElement("path",{strokeDasharray:60,strokeDashoffset:60,strokeOpacity:.3,d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"},f.createElement("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"1.3s",values:"60;0"})),f.createElement("path",{strokeDasharray:15,strokeDashoffset:15,d:"M12 3C16.9706 3 21 7.02944 21 12"},f.createElement("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.3s",values:"15;0"}),f.createElement("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"}))));function Tn(e){const{suggestion:t,query:o}=e,r=()=>{if(t.type==="header"){const{header:a,headerHighlightIndex:c}=t,l=a.slice(0,c),p=a.slice(c+o.length);return h("div",{font:"medium",children:[n("span",{children:l}),n("span",{bg:"brand-light",p:"y-0.4 x-0.8",rounded:"md",text:"text-1",children:o}),n("span",{children:p})]})}else return n("div",{font:"medium",children:t.header})},i=()=>{if(t.type!=="content")return;const{statementHighlightIndex:a,statement:c}=t,l=c.slice(0,a),p=c.slice(a+o.length);return h("div",{font:"normal",text:"sm gray-light",w:"100%",children:[n("span",{children:l}),n("span",{bg:"brand-light",p:"y-0.4 x-0.8",rounded:"md",text:"[#000]",children:o}),n("span",{children:p})]})};return h("div",{"border-b-1":"","border-t-1":"","table-cell":"",p:"x-3 y-2",hover:"bg-[#f3f4f5] ",text:"#2c3e50",className:`border-right-none border-[#eaecef] ${e.isCurrent?"bg-[#f3f4f5]":"bg-white"}`,transition:"bg duration-200",children:[n("div",{font:"medium",text:"sm",children:r()}),t.type==="content"&&i()]})}const W={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ENTER:"Enter",SEARCH:"KeyK"};function An(e){const[t,o]=y(""),[r,i]=y([]),[a,c]=y(!1),[l,p]=y(!1),[v,b]=y(!1),[g,E]=y(-1),I=U(),x=U(),[k,R]=y(!0),w=U(null),z=!a||l,te=!z&&r.length===0,j=pe(async()=>{if(I.current)return Promise.resolve();{const{PageSearcher:m}=await s(()=>import("./search.54fca8d0.js"),[]);I.current=new m(e.langRoutePrefix),await I.current.init(),c(!0)}},[e.langRoutePrefix]),D=pe(async m=>{const _=m.target.value;o(_),x.current=x.current||j(),await x.current,p(!0);const P=await I.current.match(_);p(!1),i(P)},[j]);return G(()=>{const m=_=>{switch(_.code){case W.SEARCH:(_.ctrlKey||_.metaKey)&&w.current&&(_.preventDefault(),v?(b(!1),w.current.blur()):(b(!0),w.current.focus()));break;case W.ARROW_DOWN:_.preventDefault(),E((g+1)%r.length);break;case W.ARROW_UP:_.preventDefault(),E((g-1+r.length)%r.length);break;case W.ENTER:if(g>=0){const P=r[g];window.location.href=P.link}break}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[g,v,r]),G(()=>{R(!1)},[]),h("div",{flex:"","items-center":"~",relative:"",mr:"2",font:"semibold",children:[n(Pn,{w:"5",h:"5",fill:"currentColor",onClick:()=>{b(!0),w.current.focus()}}),n("input",{disabled:k,cursor:"text focus:auto",placeholder:"Search",height:"8",border:"none",type:"text",text:"sm",p:"t-0 r-2 b-0 l-2",transition:"all duration-200 ease",className:`rounded-sm ${oe.searchInput} ${v?oe.focus:""}`,"aria-label":"Search",autoComplete:"off",onChange:D,onBlur:()=>setTimeout(()=>b(!1),200),onFocus:()=>{b(!0),x.current=j()},ref:w}),h("div",{m:"r-3",w:"10",h:"6",p:"x-1.5",rounded:"md",border:"1px solid gray-light-3",text:"xs gray-light-3",flex:"~","items-center":"~",justify:"around",className:oe.searchCommand,children:[n("span",{children:"\u2318"}),n("span",{children:"K"})]}),v&&t&&h("ul",{pos:"fixed sm:absolute top-12 sm:top-8 left-0",z:"60","border-1":"",p:"2",list:"none",bg:"bg-default",className:"w-100% sm:min-w-500px sm:max-w-700px",children:[r.map((m,_)=>n("li",{rounded:"sm",cursor:"pointer",w:"100%",className:"border-collapse",children:n("a",{block:"",href:m.link,className:"whitespace-normal",children:h("div",{table:"",w:"100%",className:"border-collapse",children:[n("div",{w:"35%","border-t-1":"","border-b-1":"","border-r-1":"","border-left":"none","table-cell":"",align:"middle right",p:"1.2",text:"sm right [#2c3e50]",font:"semibold",className:"bg-[#f5f5f5] border-[#eaecef]",children:m.title}),n(Tn,{suggestion:m,query:t,isCurrent:_===g})]})})},m.title)),te&&n("li",{flex:"center",children:n("div",{p:"2",text:"sm #2c3e50",children:"No results found"})}),z&&n("li",{flex:"center",children:n("div",{p:"2",text:"sm",children:n(Sn,{})})})]})]})}const Ln="_social-links-icon_wx6p9_1",re={socialLinksIcon:Ln},On={discord:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"Discord"}),n("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})]}),facebook:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"Facebook"}),n("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})]}),github:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"GitHub"}),n("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),instagram:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"Instagram"}),n("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"})]}),linkedin:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"LinkedIn"}),n("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})]}),slack:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"Slack"}),n("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})]}),twitter:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"Twitter"}),n("path",{d:"M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"})]}),youtube:h("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[n("title",{children:"YouTube"}),n("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})]}),juejin:h("svg",{t:"1666949308602",className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1858","data-spm-anchor-id":"a313x.7781069.0.i5",children:[n("path",{d:"M465.189 161.792c-22.967 18.14-44.325 35.109-47.397 37.742l-5.851 4.68 10.971 8.632c5.998 4.827 11.85 9.508 13.02 10.532 1.17 1.024 17.993 14.336 37.156 29.696l34.962 27.795 5.267-3.95c2.925-2.194 23.259-18.432 45.348-35.986 21.943-17.555 41.253-32.768 42.716-33.646 1.609-1.024 2.779-2.194 2.779-2.78 0-0.438-9.655-8.63-21.504-17.846-11.995-9.363-22.674-17.847-23.845-18.871-15.945-13.02-49.737-39.059-50.76-39.059-0.586 0.147-19.896 14.922-42.862 33.061z m233.325 180.37C507.465 493.275 508.928 492.105 505.417 489.911c-3.072-1.902-11.556-8.485-64.073-50.03-9.07-7.168-18.578-14.775-21.358-16.823-2.78-2.194-8.777-6.875-13.312-10.532-4.68-3.657-10.679-8.339-13.312-10.533-13.165-10.24-71.095-56.027-102.107-80.457-5.852-4.681-11.41-8.485-12.142-8.485-0.731 0-10.971 7.754-22.674 17.116-11.703 9.508-22.674 18.286-24.284 19.456-1.755 1.17-5.12 3.95-7.46 6.144-2.34 2.34-4.828 4.096-5.413 4.096-3.072 0-0.731 3.072 6.437 8.777 4.096 3.218 8.777 6.875 10.094 8.046 1.316 1.024 10.24 8.045 19.748 15.506s23.26 18.286 30.428 23.99c19.31 15.215 31.89 25.308 127.853 101.084 47.836 37.742 88.796 69.779 90.844 71.095 3.657 2.487 3.95 2.487 7.46-0.292a1041.42 1041.42 0 0 0 16.092-12.727c6.875-5.413 14.775-11.703 17.554-13.897 30.135-23.699 80.018-63.05 81.774-64.512 1.17-1.024 12.434-9.802 24.868-19.603s37.888-29.696 56.32-44.324c18.579-14.629 46.227-36.425 61.733-48.567 15.506-12.142 27.794-22.528 27.502-23.26-0.878-1.17-57.637-47.104-59.978-48.274-0.731-0.439-18.578 12.727-39.497 29.257z","p-id":"1859","data-spm-anchor-id":"a313x.7781069.0.i2"}),n("path",{d:"M57.93 489.326c-15.215 12.288-28.527 23.405-29.697 24.576-2.34 2.194-5.412-0.44 80.018 66.852 33.207 26.185 32.622 25.747 57.637 45.495 10.386 8.192 36.279 28.672 57.783 45.495 38.18 30.135 44.91 35.401 52.663 41.545 2.048 1.756 22.967 18.14 46.372 36.572 23.26 18.432 74.167 58.514 112.933 89.088 38.912 30.573 71.095 55.734 71.826 56.027 0.732 0.293 7.46-4.389 14.921-10.386 21.797-16.97 90.259-70.949 101.523-79.872 5.705-4.535 12.873-10.24 15.945-12.58 3.072-2.488 6.436-5.12 7.314-5.852 0.878-0.878 11.85-9.509 24.283-19.31 20.773-16.091 59.1-46.226 64.366-50.615 1.17-1.024 5.12-4.096 8.777-6.875 3.657-2.78 7.9-6.29 9.509-7.607 1.609-1.317 14.775-11.703 29.257-23.113 29.11-22.82 42.277-33.207 88.503-69.632 17.262-13.605 32.475-25.454 33.646-26.478 2.486-2.048 31.451-24.869 44.617-35.255 4.827-3.657 9.07-7.168 9.508-7.607 0.44-0.585 5.998-4.827 12.435-9.8 6.436-4.828 13.165-10.24 15.067-11.85l3.365-2.926-9.948-7.753c-5.412-4.388-10.24-8.192-10.679-8.63-1.17-1.317-22.381-18.433-30.135-24.284-3.95-3.072-7.314-5.998-7.606-6.73-1.317-3.071-6.73 0.147-29.258 17.994-13.458 10.532-25.746 20.187-27.355 21.504-1.61 1.463-10.533 8.338-19.749 15.652-9.216 7.168-17.115 13.459-17.554 13.898-0.439 0.438-6.583 5.412-13.897 10.971-7.168 5.559-15.214 11.703-17.7 13.75-4.974 4.097-5.413 4.39-20.334 16.239-5.56 4.388-11.264 8.777-12.435 9.8-1.17 1.025-20.333 16.092-42.422 33.354-22.09 17.408-41.546 32.768-43.155 34.084-1.609 1.463-14.482 11.557-28.525 22.528s-40.814 32.037-59.539 46.812c-18.578 14.775-42.276 33.353-52.516 41.399s-23.26 18.285-28.965 22.82l-10.386 8.339-4.389-3.072c-2.34-1.756-4.68-3.511-5.12-3.95-0.439-0.439-4.973-4.096-10.24-8.046-11.849-9.216-14.482-11.264-16.676-13.166-0.878-0.877-4.243-3.51-7.46-5.851-3.22-2.487-6.145-4.681-6.584-5.12-0.439-0.439-6.875-5.705-14.482-11.703-7.607-5.851-14.921-11.556-16.091-12.58-1.317-1.17-17.116-13.605-35.255-27.795-17.993-14.19-35.109-27.648-38.035-29.842-5.705-4.681-33.499-26.624-125.074-98.743-34.523-27.209-72.704-57.344-84.846-66.852-49.737-39.498-55.15-43.594-56.905-43.447-0.877 0-14.043 10.24-29.257 22.528z","p-id":"1860","data-spm-anchor-id":"a313x.7781069.0.i3"})]}),qq:n("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",className:"iconify iconify--ri",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n("path",{fill:"currentColor",d:"M19.913 14.529a31.977 31.977 0 0 0-.675-1.886l-.91-2.246c0-.026.012-.468.012-.696C18.34 5.86 16.507 2 12 2S5.66 5.86 5.66 9.7c0 .229.011.671.012.697l-.91 2.246a32.777 32.777 0 0 0-.675 1.886c-.86 2.737-.581 3.87-.369 3.895c.455.054 1.771-2.06 1.771-2.06c0 1.224.637 2.822 2.016 3.976c-.515.157-1.147.399-1.554.695c-.365.267-.319.54-.253.65c.289.481 4.955.307 6.303.157c1.347.15 6.014.324 6.302-.158c.066-.11.112-.382-.253-.649c-.407-.296-1.039-.538-1.555-.696c1.379-1.153 2.016-2.751 2.016-3.976c0 0 1.316 2.115 1.771 2.06c.212-.025.49-1.157-.37-3.894"})}),wechat:n("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",className:"iconify iconify--ri",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n("path",{fill:"currentColor",d:"M18.574 13.711a.91.91 0 0 0 .898-.898c0-.498-.399-.898-.898-.898s-.898.4-.898.898c0 .5.4.898.898.898zm-4.425 0a.91.91 0 0 0 .898-.898c0-.498-.4-.898-.898-.898c-.5 0-.898.4-.898.898c0 .5.399.898.898.898zm6.567 5.04a.347.347 0 0 0-.172.37c0 .048 0 .097.025.147c.098.417.294 1.081.294 1.106c0 .073.025.122.025.172a.22.22 0 0 1-.221.22c-.05 0-.074-.024-.123-.048l-1.449-.836a.799.799 0 0 0-.344-.098c-.073 0-.147 0-.196.024c-.688.197-1.4.295-2.161.295c-3.66 0-6.607-2.457-6.607-5.505c0-3.047 2.947-5.505 6.607-5.505c3.659 0 6.606 2.458 6.606 5.505c0 1.647-.884 3.146-2.284 4.154zM16.673 8.099a9.105 9.105 0 0 0-.28-.005c-4.174 0-7.606 2.86-7.606 6.505c0 .554.08 1.09.228 1.6h-.089a9.963 9.963 0 0 1-2.584-.368c-.074-.025-.148-.025-.222-.025a.832.832 0 0 0-.418.123l-1.748 1.005c-.05.025-.099.05-.148.05a.273.273 0 0 1-.27-.27c0-.074.024-.123.049-.197c.024-.024.246-.834.369-1.324c0-.05.024-.123.024-.172a.556.556 0 0 0-.221-.442C2.058 13.376 1 11.586 1 9.598C1 5.945 4.57 3 8.95 3c3.765 0 6.93 2.169 7.723 5.098zm-5.154.418c.573 0 1.026-.477 1.026-1.026c0-.573-.453-1.026-1.026-1.026s-1.026.453-1.026 1.026s.453 1.026 1.026 1.026zm-5.26 0c.573 0 1.027-.477 1.027-1.026c0-.573-.454-1.026-1.027-1.026c-.572 0-1.026.453-1.026 1.026s.454 1.026 1.026 1.026z"})}),weibo:n("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",className:"iconify iconify--ri",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n("path",{fill:"currentColor",d:"M17.525 11.378c1.263.392 2.669 1.336 2.669 3.004c0 2.763-3.98 6.239-9.964 6.239c-4.565 0-9.23-2.213-9.23-5.852c0-1.902 1.204-4.102 3.277-6.177c2.773-2.77 6.004-4.033 7.219-2.816c.537.537.588 1.464.244 2.572c-.178.557.525.25.525.25c2.24-.938 4.196-.994 4.909.027c.38.543.343 1.306-.008 2.19c-.163.407.048.471.36.563zm-7.282 7.939c3.641-.362 6.401-2.592 6.167-4.983c-.237-2.391-3.382-4.038-7.023-3.677c-3.64.36-6.403 2.59-6.167 4.98c.237 2.394 3.382 4.039 7.023 3.68zM6.16 14.438c.754-1.527 2.712-2.39 4.446-1.94c1.793.463 2.707 2.154 1.976 3.8c-.744 1.682-2.882 2.578-4.695 1.993c-1.752-.566-2.493-2.294-1.727-3.853zm1.446 2.587c.568.257 1.325.013 1.676-.55c.346-.568.163-1.217-.407-1.459c-.563-.237-1.291.008-1.64.553c-.354.547-.189 1.202.371 1.456zm2.206-1.808c.219.092.501-.012.628-.231c.123-.22.044-.466-.178-.548c-.216-.084-.486.018-.613.232c-.123.214-.054.458.163.547zM19.873 9.5a.725.725 0 1 1-1.378-.451a1.38 1.38 0 0 0-.288-1.357a1.395 1.395 0 0 0-1.321-.425a.723.723 0 1 1-.303-1.416a2.836 2.836 0 0 1 3.29 3.649zm-3.916-6.575A5.831 5.831 0 0 1 21.5 4.72a5.836 5.836 0 0 1 1.22 5.704a.838.838 0 0 1-1.06.54a.844.844 0 0 1-.542-1.062a4.143 4.143 0 0 0-4.807-5.327a.845.845 0 0 1-.354-1.65z"})}),zhihu:n("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",className:"iconify iconify--ri",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n("path",{fill:"currentColor",d:"m12.344 17.963l-1.688 1.074l-2.131-3.35c-.44 1.402-1.172 2.665-2.139 3.825c-.402.483-.82.918-1.301 1.375c-.155.147-.775.717-.878.82l-1.414-1.414c.139-.139.787-.735.915-.856c.43-.408.795-.79 1.142-1.206c1.266-1.518 2.03-3.21 2.137-5.231H3v-2h4V7h-.868c-.689 1.266-1.558 2.222-2.618 2.857L2.486 8.143c1.395-.838 2.425-2.604 3.038-5.36l1.952.434c-.14.633-.303 1.227-.489 1.783H11.5v2H9v4h2.5v2H9.185l3.159 4.963zm3.838-.07L17.298 17H19V7h-4v10h.736l.446.893zM13 5h8v14h-3l-2.5 2l-1-2H13V5z"})}),bilibili:n("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",className:"iconify iconify--ri",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n("path",{fill:"currentColor",d:"M18.223 3.086a1.25 1.25 0 0 1 0 1.768L17.08 5.996h1.17A3.75 3.75 0 0 1 22 9.747v7.5a3.75 3.75 0 0 1-3.75 3.75H5.75A3.75 3.75 0 0 1 2 17.247v-7.5a3.75 3.75 0 0 1 3.75-3.75h1.166L5.775 4.855a1.25 1.25 0 1 1 1.767-1.768l2.652 2.652c.079.079.145.165.198.257h3.213c.053-.092.12-.18.199-.258l2.651-2.652a1.25 1.25 0 0 1 1.768 0zm.027 5.42H5.75a1.25 1.25 0 0 0-1.247 1.157l-.003.094v7.5c0 .659.51 1.199 1.157 1.246l.093.004h12.5a1.25 1.25 0 0 0 1.247-1.157l.003-.093v-7.5c0-.69-.56-1.25-1.25-1.25zm-10 2.5c.69 0 1.25.56 1.25 1.25v1.25a1.25 1.25 0 1 1-2.5 0v-1.25c0-.69.56-1.25 1.25-1.25zm7.5 0c.69 0 1.25.56 1.25 1.25v1.25a1.25 1.25 0 1 1-2.5 0v-1.25c0-.69.56-1.25 1.25-1.25z"})})},ut=e=>{const{link:t,popperStyle:o={}}=e,{icon:r,mode:i="link",content:a}=t,c=typeof r=="object"?n("div",{dangerouslySetInnerHTML:{__html:r.svg}}):On[r],[l,p]=y(!1),v=()=>{p(!0)},b=()=>{p(!1)};if(i==="link")return n("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:n("div",{className:`${re.socialLinksIcon}`,children:c})},r);if(i==="text")return h("div",{className:`${re.socialLinksIcon}`,cursor:"pointer",relative:"",onMouseEnter:v,onMouseLeave:b,children:[c,l?n("div",{absolute:"",z:"1",p:"3",w:"50",break:"all",pos:"right-0","border-1":"",rounded:"xl",bg:"bg-default",style:{boxShadow:"var(--island-shadow-3)",...o},children:n("div",{text:"ml",children:a})}):null]});if(i==="img")return h("div",{className:`${re.socialLinksIcon}`,cursor:"pointer",relative:"",onMouseEnter:v,onMouseLeave:b,children:[c,l?n("div",{absolute:"",z:"1",p:"3",w:"50",break:"all",pos:"right-0","border-1":"",rounded:"xl",bg:"bg-default",style:{boxShadow:"var(--island-shadow-3)",...o},children:n("img",{src:a,alt:"img"})}):null]})},kn=e=>{const{links:t,moreIconVisible:o=!1,mouseEnter:r}=e;return h(xt,{children:[n("div",{h:"100%",flex:"",gap:"x-4","items-center":"",transition:"color duration-300",children:t.map(i=>n(ut,{link:i,popperStyle:{top:"2.5rem"}},i.icon))}),o?n("div",{className:"i-carbon-chevron-sort-down ml-1",onMouseEnter:r}):null]})},Mn=e=>{const{links:t}=e;return n("div",{absolute:"",pos:"top-13 right-0",z:"1",p:"3",w:"32","border-1":"",rounded:"xl",bg:"bg-default",style:{boxShadow:"var(--island-shadow-3)",marginRight:"-2px"},flex:"~ wrap",gap:"4",children:t.map(o=>n(ut,{link:o,popperStyle:{top:"1.25rem"}},o.icon))})},mt=({socialLinks:e})=>{const t=e.length>3,o=[],r=[];for(const c in e)c<3?o.push(e[c]):r.push(e[c]);const[i,a]=y(!1);return h("div",{className:"social-links","nav-h":"mobile sm:desktop",flex:"","items-center":"",before:"menu-item-before",relative:"",onMouseLeave:()=>a(!1),children:[n(kn,{links:o,moreIconVisible:t,mouseEnter:()=>a(!0)}),i?n(Mn,{links:r}):null]})},Cn="_navHamburger_14nz8_1",Nn="_container_14nz8_14",jn="_top_14nz8_21",Dn="_middle_14nz8_27",Vn="_bottom_14nz8_33",Un="_active_14nz8_39",M={navHamburger:Cn,container:Nn,top:jn,middle:Dn,bottom:Vn,active:Un},$n="_navScreen_1mkpq_1",Bn="_active_1mkpq_17",Hn="_container_1mkpq_21",qn="_navMenu_1mkpq_27",Wn="_navMenuItem_1mkpq_34",Fn="_navAppearance_1mkpq_46",Gn="_socialAndAppearance_1mkpq_50",S={navScreen:$n,active:Bn,container:Hn,navMenu:qn,navMenuItem:Wn,navAppearance:Fn,socialAndAppearance:Gn};function Yn(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}else return Array.from(e)}var le=!1;if(typeof window<"u"){var we={get passive(){le=!0}};window.addEventListener("testPassive",null,we),window.removeEventListener("testPassive",null,we)}var X=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),C=[],Z=!1,de=-1,$=void 0,A=void 0,B=void 0,ht=function(t){return C.some(function(o){return!!(o.options.allowTouchMove&&o.options.allowTouchMove(t))})},Q=function(t){var o=t||window.event;return ht(o.target)||o.touches.length>1?!0:(o.preventDefault&&o.preventDefault(),!1)},Kn=function(t){if(B===void 0){var o=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;if(o&&r>0){var i=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);B=document.body.style.paddingRight,document.body.style.paddingRight=i+r+"px"}}$===void 0&&($=document.body.style.overflow,document.body.style.overflow="hidden")},Xn=function(){B!==void 0&&(document.body.style.paddingRight=B,B=void 0),$!==void 0&&(document.body.style.overflow=$,$=void 0)},Zn=function(){return window.requestAnimationFrame(function(){if(A===void 0){A={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,o=t.scrollY,r=t.scrollX,i=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-o,document.body.style.left=-r,setTimeout(function(){return window.requestAnimationFrame(function(){var a=i-window.innerHeight;a&&o>=i&&(document.body.style.top=-(o+a))})},300)}})},Qn=function(){if(A!==void 0){var t=-parseInt(document.body.style.top,10),o=-parseInt(document.body.style.left,10);document.body.style.position=A.position,document.body.style.top=A.top,document.body.style.left=A.left,window.scrollTo(o,t),A=void 0}},Jn=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},eo=function(t,o){var r=t.targetTouches[0].clientY-de;return ht(t.target)?!1:o&&o.scrollTop===0&&r>0||Jn(o)&&r<0?Q(t):(t.stopPropagation(),!0)},to=function(t,o){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!C.some(function(i){return i.targetElement===t})){var r={targetElement:t,options:o||{}};C=[].concat(Yn(C),[r]),X?Zn():Kn(o),X&&(t.ontouchstart=function(i){i.targetTouches.length===1&&(de=i.targetTouches[0].clientY)},t.ontouchmove=function(i){i.targetTouches.length===1&&eo(i,t)},Z||(document.addEventListener("touchmove",Q,le?{passive:!1}:void 0),Z=!0))}},no=function(){X&&(C.forEach(function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null}),Z&&(document.removeEventListener("touchmove",Q,le?{passive:!1}:void 0),Z=!1),de=-1),X?Qn():Xn(),C=[]};const oo="_navScreenMenuGroup_1xte3_1",ro="_open_1xte3_7",io="_button_1xte3_12",ao="_buttonSpan_1xte3_25",so="_items_1xte3_32",co="_down_1xte3_40",T={navScreenMenuGroup:oo,open:ro,button:io,buttonSpan:ao,items:so,down:co},pt=e=>f.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",...e},f.createElement("path",{fill:"currentColor",d:"M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z"})),ft=e=>f.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",...e},f.createElement("path",{fill:"currentColor",d:"M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6H10z"})),lo="_link_r3fql_1",uo={link:lo};function u(e){const t=_t(e);let o,r;const a=wt(function(l,p){const b=U(o!=null?o:t).current;return n(b,{ref:p,...l})});return a.preload=()=>(r||(r=e().then(c=>(o=c.default,c))),r),a}const ye=u(()=>s(()=>import("./build-config.72eb0918.js"),["assets/build-config.72eb0918.js","assets/components.esm.03560353.js"])),Ee=u(()=>s(()=>import("./build-preset.c20dcd40.js"),["assets/build-preset.c20dcd40.js","assets/components.esm.03560353.js"])),xe=u(()=>s(()=>import("./design-system.c4745cce.js"),["assets/design-system.c4745cce.js","assets/components.esm.03560353.js"])),Ie=u(()=>s(()=>import("./dev.1fd06000.js"),["assets/dev.1fd06000.js","assets/components.esm.03560353.js"])),Re=u(()=>s(()=>import("./index.ccb6ce27.js"),[])),ze=u(()=>s(()=>import("./plugin.895932d8.js"),["assets/plugin.895932d8.js","assets/components.esm.03560353.js"])),Pe=u(()=>s(()=>import("./test.0e81f002.js"),["assets/test.0e81f002.js","assets/components.esm.03560353.js"])),Se=u(()=>s(()=>import("./before-getting-started.582a31cc.js"),["assets/before-getting-started.582a31cc.js","assets/components.esm.03560353.js"])),Te=u(()=>s(()=>import("./build-your-ui.7f349247.js"),[])),Ae=u(()=>s(()=>import("./command-preview.dc51b953.js"),["assets/command-preview.dc51b953.js","assets/components.esm.03560353.js"])),Le=u(()=>s(()=>import("./extension.12299fd6.js"),[])),Oe=u(()=>s(()=>import("./getting-started.b1ed3f10.js"),["assets/getting-started.b1ed3f10.js","assets/components.esm.03560353.js"])),ke=u(()=>s(()=>import("./modify-output-product.b91eff1f.js"),["assets/modify-output-product.b91eff1f.js","assets/components.esm.03560353.js"])),Me=u(()=>s(()=>import("./publish-your-project.8d398b17.js"),["assets/publish-your-project.8d398b17.js","assets/components.esm.03560353.js"])),Ce=u(()=>s(()=>import("./test-your-project.f53bebf7.js"),["assets/test-your-project.f53bebf7.js","assets/components.esm.03560353.js"])),Ne=u(()=>s(()=>import("./use-micro-generator.db5520c1.js"),[])),je=u(()=>s(()=>import("./using-storybook.a2212f2e.js"),["assets/using-storybook.a2212f2e.js","assets/components.esm.03560353.js"])),De=u(()=>s(()=>import("./welcome.0449a9c8.js"),[])),Ve=u(()=>s(()=>import("./why-module-engineering-solution.c9a45cbd.js"),[])),Ue=u(()=>s(()=>import("./index.cb118238.js"),[])),$e=u(()=>s(()=>import("./build-config.d8bb1658.js"),["assets/build-config.d8bb1658.js","assets/components.esm.03560353.js"])),Be=u(()=>s(()=>import("./build-preset.96805d7d.js"),["assets/build-preset.96805d7d.js","assets/components.esm.03560353.js"])),He=u(()=>s(()=>import("./design-system.86694ff5.js"),["assets/design-system.86694ff5.js","assets/components.esm.03560353.js"])),qe=u(()=>s(()=>import("./dev.1d326a37.js"),["assets/dev.1d326a37.js","assets/components.esm.03560353.js"])),We=u(()=>s(()=>import("./index.6cef6f5f.js"),[])),Fe=u(()=>s(()=>import("./plugin.d2fbc531.js"),["assets/plugin.d2fbc531.js","assets/components.esm.03560353.js"])),Ge=u(()=>s(()=>import("./test.0da1f99f.js"),["assets/test.0da1f99f.js","assets/components.esm.03560353.js"])),Ye=u(()=>s(()=>import("./before-getting-started.1b82b538.js"),["assets/before-getting-started.1b82b538.js","assets/components.esm.03560353.js"])),Ke=u(()=>s(()=>import("./build-your-ui.a8361604.js"),[])),Xe=u(()=>s(()=>import("./command-preview.2d45fc82.js"),["assets/command-preview.2d45fc82.js","assets/components.esm.03560353.js"])),Ze=u(()=>s(()=>import("./extension.96dc63a4.js"),[])),Qe=u(()=>s(()=>import("./getting-started.40e9218d.js"),["assets/getting-started.40e9218d.js","assets/components.esm.03560353.js"])),Je=u(()=>s(()=>import("./modify-output-product.7f6bff35.js"),["assets/modify-output-product.7f6bff35.js","assets/components.esm.03560353.js"])),et=u(()=>s(()=>import("./publish-your-project.21b8309f.js"),["assets/publish-your-project.21b8309f.js","assets/components.esm.03560353.js"])),tt=u(()=>s(()=>import("./test-your-project.18bd4582.js"),["assets/test-your-project.18bd4582.js","assets/components.esm.03560353.js"])),nt=u(()=>s(()=>import("./use-micro-generator.7d9e4016.js"),[])),ot=u(()=>s(()=>import("./using-storybook.57ea6b77.js"),["assets/using-storybook.57ea6b77.js","assets/components.esm.03560353.js"])),rt=u(()=>s(()=>import("./welcome.a8448931.js"),[])),it=u(()=>s(()=>import("./why-module-engineering-solution.6ae8c0e3.js"),[])),at=u(()=>s(()=>import("./index.2b2347ea.js"),[])),mo=[{path:"/en/api/build-config",element:d.createElement(ye),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/build-config.md",preload:ye.preload},{path:"/en/api/build-preset",element:d.createElement(Ee),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/build-preset.md",preload:Ee.preload},{path:"/en/api/design-system",element:d.createElement(xe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/design-system.md",preload:xe.preload},{path:"/en/api/dev",element:d.createElement(Ie),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/dev.md",preload:Ie.preload},{path:"/en/api/",element:d.createElement(Re),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/index.md",preload:Re.preload},{path:"/en/api/plugin",element:d.createElement(ze),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/plugin.md",preload:ze.preload},{path:"/en/api/test",element:d.createElement(Pe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/api/test.md",preload:Pe.preload},{path:"/en/guide/before-getting-started",element:d.createElement(Se),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/before-getting-started.md",preload:Se.preload},{path:"/en/guide/build-your-ui",element:d.createElement(Te),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/build-your-ui.md",preload:Te.preload},{path:"/en/guide/command-preview",element:d.createElement(Ae),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/command-preview.md",preload:Ae.preload},{path:"/en/guide/extension",element:d.createElement(Le),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/extension.md",preload:Le.preload},{path:"/en/guide/getting-started",element:d.createElement(Oe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/getting-started.md",preload:Oe.preload},{path:"/en/guide/modify-output-product",element:d.createElement(ke),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/modify-output-product.md",preload:ke.preload},{path:"/en/guide/publish-your-project",element:d.createElement(Me),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/publish-your-project.md",preload:Me.preload},{path:"/en/guide/test-your-project",element:d.createElement(Ce),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/test-your-project.mdx",preload:Ce.preload},{path:"/en/guide/use-micro-generator",element:d.createElement(Ne),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/use-micro-generator.md",preload:Ne.preload},{path:"/en/guide/using-storybook",element:d.createElement(je),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/using-storybook.mdx",preload:je.preload},{path:"/en/guide/welcome",element:d.createElement(De),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/welcome.md",preload:De.preload},{path:"/en/guide/why-module-engineering-solution",element:d.createElement(Ve),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/guide/why-module-engineering-solution.md",preload:Ve.preload},{path:"/en/",element:d.createElement(Ue),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/en/index.md",preload:Ue.preload},{path:"/zh/api/build-config",element:d.createElement($e),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/build-config.md",preload:$e.preload},{path:"/zh/api/build-preset",element:d.createElement(Be),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/build-preset.md",preload:Be.preload},{path:"/zh/api/design-system",element:d.createElement(He),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/design-system.md",preload:He.preload},{path:"/zh/api/dev",element:d.createElement(qe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/dev.md",preload:qe.preload},{path:"/zh/api/",element:d.createElement(We),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/index.md",preload:We.preload},{path:"/zh/api/plugin",element:d.createElement(Fe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/plugin.md",preload:Fe.preload},{path:"/zh/api/test",element:d.createElement(Ge),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/api/test.md",preload:Ge.preload},{path:"/zh/guide/before-getting-started",element:d.createElement(Ye),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/before-getting-started.md",preload:Ye.preload},{path:"/zh/guide/build-your-ui",element:d.createElement(Ke),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/build-your-ui.md",preload:Ke.preload},{path:"/zh/guide/command-preview",element:d.createElement(Xe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/command-preview.md",preload:Xe.preload},{path:"/zh/guide/extension",element:d.createElement(Ze),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/extension.md",preload:Ze.preload},{path:"/zh/guide/getting-started",element:d.createElement(Qe),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/getting-started.md",preload:Qe.preload},{path:"/zh/guide/modify-output-product",element:d.createElement(Je),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/modify-output-product.md",preload:Je.preload},{path:"/zh/guide/publish-your-project",element:d.createElement(et),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/publish-your-project.md",preload:et.preload},{path:"/zh/guide/test-your-project",element:d.createElement(tt),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/test-your-project.mdx",preload:tt.preload},{path:"/zh/guide/use-micro-generator",element:d.createElement(nt),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/use-micro-generator.md",preload:nt.preload},{path:"/zh/guide/using-storybook",element:d.createElement(ot),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/using-storybook.mdx",preload:ot.preload},{path:"/zh/guide/welcome",element:d.createElement(rt),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/welcome.md",preload:rt.preload},{path:"/zh/guide/why-module-engineering-solution",element:d.createElement(it),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/why-module-engineering-solution.md",preload:it.preload},{path:"/zh/",element:d.createElement(at),filePath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/index.md",preload:at.preload}],ho=()=>typeof window<"u";function ue(e){return e.charAt(0)==="/"?e:"/"+e}function po(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function fo(e){return po(ue(e))}const vo="/";yt({data:ho()?window==null?void 0:window.ISLAND_PAGE_DATA:null,setData:e=>{}});const Do=(e=()=>!0)=>Promise.all(mo.filter(e).map(async t=>({...await t.preload(),routePath:t.path})));function go(e="/"){const t=fo(vo),o=ue(e);return`${t}${o}`}function bo(e){if(!e)return"/";if(e.startsWith("http"))return e;let t="";return t+=".html",e.endsWith("/")&&(t="index"+t),ue(`${e}${t}`)}const ae="island-theme-appearance",_o=["https://island-tutorial.sanyuan0704.top","https://island.sanyuan0704.top","https://islandjs.dev"],wo=/^(https?:)?\/\//;function me(e){const{href:t="/",children:o,className:r=""}=e,i=wo.test(t),a=_o.some(v=>t.startsWith(v)),c=i&&!a?"_blank":"",l=i?"noopener noreferrer":void 0,p=i?t:go(t);return n("a",{href:p,target:c,rel:l,className:`${uo.link} ${r}`,children:o})}function vt(e){const{activeIndex:t}=e,[o,r]=y(!1);return h("div",{relative:"",className:`${o?T.open:""} ${T.navScreenMenuGroup}`,children:[h("button",{className:T.button,onClick:()=>{r(!o)},children:[n("span",{className:T.buttonSpan,children:e.text}),n(pt,{className:`${o?T.open:""} ${T.down} `})]}),n("div",{children:n("div",{className:T.items,children:e.items.map((i,a)=>a===t?n("div",{className:"pa-1",children:n("span",{mr:"1",text:"brand",children:i.text})},i.link):n("div",{className:"pa-1",font:"medium",children:n(me,{href:i.link,children:n("div",{children:h("div",{flex:"",children:[n("span",{mr:"1",children:i.text}),n(ft,{w:"11px",h:"11px",text:"text-3",m:"t-1 r-1"})]})})})},i.link))})})]})}function yo(e){const{pathname:t}=e,o=new RegExp(e.activeMatch||e.link).test(t);return n("div",{text:"sm",font:"medium",m:"x-3",className:`${o?"text-brand":""}`,children:n(me,{href:bo(e.link),children:e.text})},e.text)}const Eo="_check_1tqe3_17",xo="_icon_1tqe3_34",Io="_dark_1tqe3_29",ie={switch:"_switch_1tqe3_1",check:Eo,icon:xo,dark:Io};function Ro(e){var t;return n("button",{className:`${ie.switch} ${e.className}`,id:(t=e.id)!=null?t:"",type:"button",role:"switch",...e.onClick?{onClick:e.onClick}:{},children:n("span",{className:ie.check,children:n("span",{className:ie.icon,children:e.children})})})}const zo="_sun_8e60k_1",Po="_moon_8e60k_5",st={sun:zo,moon:Po},So=e=>f.createElement("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",...e},f.createElement("path",{d:"M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"}),f.createElement("path",{d:"M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"}),f.createElement("path",{d:"M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"}),f.createElement("path",{d:"M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"}),f.createElement("path",{d:"M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"}),f.createElement("path",{d:"M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"}),f.createElement("path",{d:"M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"}),f.createElement("path",{d:"M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"}),f.createElement("path",{d:"M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"})),To=e=>f.createElement("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",...e},f.createElement("path",{d:"M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"}));let L=!0,F,O,N;typeof window<"u"&&typeof localStorage<"u"&&(O=localStorage.getItem(ae)||"auto",N=window.matchMedia("(prefers-color-scheme: dark)"),L=O==="auto"?N.matches:O==="dark",N.onchange=e=>{O==="auto"&&se(L=e.matches)});const se=e=>{F[e?"add":"remove"]("dark")},Ao=()=>{if(typeof window<"u"&&F===void 0){F=document.documentElement.classList;const e=()=>{const t=localStorage.getItem(ae)||"auto";F&&(se(t==="auto"?N.matches:t==="dark"),L=!L)};window.addEventListener("storage",e)}return()=>{se(L=!L),typeof window<"u"&&typeof localStorage<"u"&&(L?O=N.matches?"auto":"dark":O=N.matches?"light":"auto",localStorage.setItem(ae,O))}};function gt(e){const t=Ao();return h(Ro,{onClick:t,children:[n(So,{className:st.sun}),n(To,{className:st.moon})]})}const bt=e=>f.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",...e},f.createElement("path",{fill:"currentColor",d:"M27.85 29H30l-6-15h-2.35l-6 15h2.15l1.6-4h6.85zm-7.65-6l2.62-6.56L25.45 23zM18 7V5h-7V2H9v3H2v2h10.74a14.71 14.71 0 0 1-3.19 6.18A13.5 13.5 0 0 1 7.26 9h-2.1a16.47 16.47 0 0 0 3 5.58A16.84 16.84 0 0 1 3 18l.75 1.86A18.47 18.47 0 0 0 9.53 16a16.92 16.92 0 0 0 5.76 3.84L16 18a14.48 14.48 0 0 1-5.12-3.37A17.64 17.64 0 0 0 14.8 7z"})),Lo=({translationMenuData:e})=>n("div",{className:S.navTranslations,flex:"~",text:"sm",font:"bold",justify:"center",children:n("div",{m:"x-1.5",children:n(vt,{...e})})});function Oo(e){var k;const{isScreenOpen:t,localeData:o,siteData:r,pathname:i}=e,a=U(null),c=Object.values(r.themeConfig.locales||{}),l=c.length>1,p=o.nav||[],v=((k=r==null?void 0:r.themeConfig)==null?void 0:k.socialLinks)||[],b=r.appearance!==!1,g=v.length>0,E=l?{text:n(bt,{w:"18px",h:"18px"}),items:c.map(R=>({text:R.label,link:`/${R.lang}`})),activeIndex:c.findIndex(R=>R.lang===o.lang)}:null,I=()=>n("div",{className:`items-center appearance pa-2 ${S.navAppearance}`,flex:"~",justify:"center",children:n(gt,{})}),x=({menuItems:R})=>n("div",{className:S.navMenu,children:R.map((w,z)=>n("div",{w:"100%",className:S.navMenuItem,children:"link"in w?n(yo,{pathname:i,...w},z):n("div",{m:"x-3",last:"mr-0",children:n(vt,{...w})},z)},z))});return G(()=>(a.current&&t&&to(a.current,{reserveScrollBarGap:!0}),()=>{no()}),[t]),n("div",{className:`${S.navScreen} ${t?S.active:""}`,ref:a,id:"navScreen",children:h("div",{className:S.container,children:[n(x,{menuItems:p}),h("div",{className:S.socialAndAppearance,flex:"~",justify:"center","items-center":"center",children:[b&&n(I,{}),g&&n(mt,{__island:!0,socialLinks:v})]}),l&&n(Lo,{translationMenuData:E})]})})}function ko(){const[e,t]=y(!1);function o(){t(!0),window.addEventListener("resize",a)}function r(){t(!1),window.removeEventListener("resize",a)}function i(){e?r():o()}function a(){window.outerWidth>=768&&r()}return{isScreenOpen:e,openScreen:o,closeScreen:r,toggleScreen:i}}function Mo(e){const{localeData:t,siteData:o,pathname:r}=e,{isScreenOpen:i,toggleScreen:a}=ko();return h(Et,{children:[n("button",{onClick:a,className:`${i?M.active:""} ${M.navHamburger}`,children:h("span",{className:M.container,children:[n("span",{className:M.top}),n("span",{className:M.middle}),n("span",{className:M.bottom})]})}),n(Oo,{isScreenOpen:i,localeData:t,siteData:o,pathname:r})]})}function Co(e){const{activeIndex:t,isTranslation:o}=e,[r,i]=y(!1);return h("div",{relative:"",onMouseLeave:()=>i(!1),children:[h("button",{onMouseEnter:()=>i(!0),flex:"center","nav-h":"mobile sm:desktop",font:"medium",text:"sm text-1 hover:text-2",transition:"color duration-200",className:"nav-menu-group-button",children:[n("span",{mr:"1",text:"sm",font:"medium",children:o?n(bt,{w:"18px",h:"18px"}):e.text}),n(pt,{})]}),n("div",{absolute:"",pos:"top-13 right-0",m:"x-0.8",transition:"opacity duration-300",className:"nav-menu-group-content",style:{opacity:r?1:0,visibility:r?"visible":"hidden"},children:n("div",{p:"3",w:"100%",h:"100%",className:"min-w-128px max-h-100vh","border-1":"",rounded:"xl",bg:"bg-default",style:{boxShadow:"var(--island-shadow-3)",marginRight:"-1.5rem",zIndex:100},children:e.items.map((a,c)=>c===t?n("div",{rounded:"md",p:"y-1.6 l-3",children:n("span",{mr:"1",text:"brand",children:a.text})},a.link):n("div",{font:"medium",children:n(me,{href:a.link,children:n("div",{rounded:"md",hover:"bg-bg-mute",p:"y-1.6 l-3",children:h("div",{flex:"",children:[n("span",{mr:"1",children:a.text}),n(ft,{w:"11px",h:"11px",text:"text-3",m:"t-1 r-1"})]})})})},a.link))})})]})}window.ISLANDS={BackTop:yn,Search:An,SocialLinks:mt,NavHamburger:Mo,NavMenuGroup:Co,SwitchAppearance:gt};window.ISLAND_PROPS=JSON.parse(document.getElementById("island-props").textContent);export{Y as S,K as a,tn as b,nn as c,Ht as f,Do as g,rn as i,bo as n,lt as r,go as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="var(--island-c-brand)" stroke-linecap="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" stroke-opacity=".3" d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.3s" values="60;0"/></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M12 3C16.9706 3 21 7.02944 21 12"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></g></svg>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import{jsx as o,jsxs as n,Fragment as d}from"react/jsx-runtime";import{a as s,C as l}from"./components.esm.03560353.js";import"react";import"react-dom";const r={annotations:s,Code:l},i={staticMediaQuery:"not screen, (max-width: 768px)",theme:{name:"nord",type:"dark",semanticHighlighting:!0,colors:{focusBorder:"#3b4252",foreground:"#d8dee9","activityBar.background":"#2e3440","activityBar.dropBackground":"#3b4252","activityBar.foreground":"#d8dee9","activityBar.activeBorder":"#88c0d0","activityBar.activeBackground":"#3b4252","activityBarBadge.background":"#88c0d0","activityBarBadge.foreground":"#2e3440","badge.foreground":"#2e3440","badge.background":"#88c0d0","button.background":"#88c0d0ee","button.foreground":"#2e3440","button.hoverBackground":"#88c0d0","button.secondaryBackground":"#434c5e","button.secondaryForeground":"#d8dee9","button.secondaryHoverBackground":"#4c566a","charts.red":"#bf616a","charts.blue":"#81a1c1","charts.yellow":"#ebcb8b","charts.orange":"#d08770","charts.green":"#a3be8c","charts.purple":"#b48ead","charts.foreground":"#d8dee9","charts.lines":"#88c0d0","debugConsole.infoForeground":"#88c0d0","debugConsole.warningForeground":"#ebcb8b","debugConsole.errorForeground":"#bf616a","debugConsole.sourceForeground":"#616e88","debugConsoleInputIcon.foreground":"#81a1c1","debugExceptionWidget.background":"#4c566a","debugExceptionWidget.border":"#2e3440","debugToolBar.background":"#3b4252",descriptionForeground:"#d8dee9e6","diffEditor.insertedTextBackground":"#81a1c133","diffEditor.removedTextBackground":"#bf616a4d","dropdown.background":"#3b4252","dropdown.border":"#3b4252","dropdown.foreground":"#d8dee9","editorActiveLineNumber.foreground":"#d8dee9cc","editorCursor.foreground":"#d8dee9","editorHint.border":"#ebcb8b00","editorHint.foreground":"#ebcb8b","editorIndentGuide.background":"#434c5eb3","editorIndentGuide.activeBackground":"#4c566a","editorInlayHint.background":"#434c5e","editorInlayHint.foreground":"#d8dee9","editorLineNumber.foreground":"#4c566a","editorLineNumber.activeForeground":"#d8dee9","editorWhitespace.foreground":"#4c566ab3","editorWidget.background":"#2e3440","editorWidget.border":"#3b4252","editor.background":"#2e3440","editor.foreground":"#d8dee9","editor.hoverHighlightBackground":"#3b4252","editor.findMatchBackground":"#88c0d066","editor.findMatchHighlightBackground":"#88c0d033","editor.findRangeHighlightBackground":"#88c0d033","editor.lineHighlightBackground":"#3b4252","editor.lineHighlightBorder":"#3b4252","editor.inactiveSelectionBackground":"#434c5ecc","editor.inlineValuesBackground":"#4c566a","editor.inlineValuesForeground":"#eceff4","editor.selectionBackground":"#434c5ecc","editor.selectionHighlightBackground":"#434c5ecc","editor.rangeHighlightBackground":"#434c5e52","editor.wordHighlightBackground":"#81a1c166","editor.wordHighlightStrongBackground":"#81a1c199","editor.stackFrameHighlightBackground":"#5e81ac","editor.focusedStackFrameHighlightBackground":"#5e81ac","editorError.foreground":"#bf616a","editorError.border":"#bf616a00","editorWarning.foreground":"#ebcb8b","editorWarning.border":"#ebcb8b00","editorBracketMatch.background":"#2e344000","editorBracketMatch.border":"#88c0d0","editorBracketHighlight.foreground1":"#8fbcbb","editorBracketHighlight.foreground2":"#88c0d0","editorBracketHighlight.foreground3":"#81a1c1","editorBracketHighlight.foreground4":"#5e81ac","editorBracketHighlight.foreground5":"#8fbcbb","editorBracketHighlight.foreground6":"#88c0d0","editorBracketHighlight.unexpectedBracket.foreground":"#bf616a","editorCodeLens.foreground":"#4c566a","editorGroup.background":"#2e3440","editorGroup.border":"#3b425201","editorGroup.dropBackground":"#3b425299","editorGroupHeader.border":"#3b425200","editorGroupHeader.noTabsBackground":"#2e3440","editorGroupHeader.tabsBackground":"#2e3440","editorGroupHeader.tabsBorder":"#3b425200","editorGutter.background":"#2e3440","editorGutter.modifiedBackground":"#ebcb8b","editorGutter.addedBackground":"#a3be8c","editorGutter.deletedBackground":"#bf616a","editorHoverWidget.background":"#3b4252","editorHoverWidget.border":"#3b4252","editorLink.activeForeground":"#88c0d0","editorMarkerNavigation.background":"#5e81acc0","editorMarkerNavigationError.background":"#bf616ac0","editorMarkerNavigationWarning.background":"#ebcb8bc0","editorOverviewRuler.border":"#3b4252","editorOverviewRuler.currentContentForeground":"#3b4252","editorOverviewRuler.incomingContentForeground":"#3b4252","editorOverviewRuler.findMatchForeground":"#88c0d066","editorOverviewRuler.rangeHighlightForeground":"#88c0d066","editorOverviewRuler.selectionHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightStrongForeground":"#88c0d066","editorOverviewRuler.modifiedForeground":"#ebcb8b","editorOverviewRuler.addedForeground":"#a3be8c","editorOverviewRuler.deletedForeground":"#bf616a","editorOverviewRuler.errorForeground":"#bf616a","editorOverviewRuler.warningForeground":"#ebcb8b","editorOverviewRuler.infoForeground":"#81a1c1","editorRuler.foreground":"#434c5e","editorSuggestWidget.background":"#2e3440","editorSuggestWidget.border":"#3b4252","editorSuggestWidget.foreground":"#d8dee9","editorSuggestWidget.focusHighlightForeground":"#88c0d0","editorSuggestWidget.highlightForeground":"#88c0d0","editorSuggestWidget.selectedBackground":"#434c5e","editorSuggestWidget.selectedForeground":"#d8dee9","extensionButton.prominentForeground":"#d8dee9","extensionButton.prominentBackground":"#434c5e","extensionButton.prominentHoverBackground":"#4c566a",errorForeground:"#bf616a","gitDecoration.modifiedResourceForeground":"#ebcb8b","gitDecoration.deletedResourceForeground":"#bf616a","gitDecoration.untrackedResourceForeground":"#a3be8c","gitDecoration.ignoredResourceForeground":"#d8dee966","gitDecoration.conflictingResourceForeground":"#5e81ac","gitDecoration.submoduleResourceForeground":"#8fbcbb","gitDecoration.stageDeletedResourceForeground":"#bf616a","gitDecoration.stageModifiedResourceForeground":"#ebcb8b","input.background":"#3b4252","input.foreground":"#d8dee9","input.placeholderForeground":"#d8dee999","input.border":"#3b4252","inputOption.activeBackground":"#5e81ac","inputOption.activeBorder":"#5e81ac","inputOption.activeForeground":"#eceff4","inputValidation.errorBackground":"#bf616a","inputValidation.errorBorder":"#bf616a","inputValidation.infoBackground":"#81a1c1","inputValidation.infoBorder":"#81a1c1","inputValidation.warningBackground":"#d08770","inputValidation.warningBorder":"#d08770","keybindingLabel.background":"#4c566a","keybindingLabel.border":"#4c566a","keybindingLabel.bottomBorder":"#4c566a","keybindingLabel.foreground":"#d8dee9","list.activeSelectionBackground":"#88c0d0","list.activeSelectionForeground":"#2e3440","list.inactiveSelectionBackground":"#434c5e","list.inactiveSelectionForeground":"#d8dee9","list.inactiveFocusBackground":"#434c5ecc","list.hoverForeground":"#eceff4","list.focusForeground":"#d8dee9","list.focusBackground":"#88c0d099","list.focusHighlightForeground":"#eceff4","list.hoverBackground":"#3b4252","list.dropBackground":"#88c0d099","list.highlightForeground":"#88c0d0","list.errorForeground":"#bf616a","list.warningForeground":"#ebcb8b","merge.currentHeaderBackground":"#81a1c166","merge.currentContentBackground":"#81a1c14d","merge.incomingHeaderBackground":"#8fbcbb66","merge.incomingContentBackground":"#8fbcbb4d","merge.border":"#3b425200","minimap.background":"#2e3440","minimap.errorHighlight":"#bf616acc","minimap.findMatchHighlight":"#88c0d0","minimap.selectionHighlight":"#88c0d0cc","minimap.warningHighlight":"#ebcb8bcc","minimapGutter.addedBackground":"#a3be8c","minimapGutter.deletedBackground":"#bf616a","minimapGutter.modifiedBackground":"#ebcb8b","minimapSlider.activeBackground":"#434c5eaa","minimapSlider.background":"#434c5e99","minimapSlider.hoverBackground":"#434c5eaa","notification.background":"#3b4252","notification.buttonBackground":"#434c5e","notification.buttonForeground":"#d8dee9","notification.buttonHoverBackground":"#4c566a","notification.errorBackground":"#bf616a","notification.errorForeground":"#2e3440","notification.foreground":"#d8dee9","notification.infoBackground":"#88c0d0","notification.infoForeground":"#2e3440","notification.warningBackground":"#ebcb8b","notification.warningForeground":"#2e3440","notificationCenter.border":"#3b425200","notificationCenterHeader.background":"#2e3440","notificationCenterHeader.foreground":"#88c0d0","notificationLink.foreground":"#88c0d0","notifications.background":"#3b4252","notifications.border":"#2e3440","notifications.foreground":"#d8dee9","notificationToast.border":"#3b425200","panel.background":"#2e3440","panel.border":"#3b4252","panelTitle.activeBorder":"#88c0d000","panelTitle.activeForeground":"#88c0d0","panelTitle.inactiveForeground":"#d8dee9","peekView.border":"#4c566a","peekViewEditor.background":"#2e3440","peekViewEditorGutter.background":"#2e3440","peekViewEditor.matchHighlightBackground":"#88c0d04d","peekViewResult.background":"#2e3440","peekViewResult.fileForeground":"#88c0d0","peekViewResult.lineForeground":"#d8dee966","peekViewResult.matchHighlightBackground":"#88c0d0cc","peekViewResult.selectionBackground":"#434c5e","peekViewResult.selectionForeground":"#d8dee9","peekViewTitle.background":"#3b4252","peekViewTitleDescription.foreground":"#d8dee9","peekViewTitleLabel.foreground":"#88c0d0","pickerGroup.border":"#3b4252","pickerGroup.foreground":"#88c0d0","progressBar.background":"#88c0d0","quickInputList.focusBackground":"#88c0d0","quickInputList.focusForeground":"#2e3440","sash.hoverBorder":"#88c0d0","scrollbar.shadow":"#00000066","scrollbarSlider.activeBackground":"#434c5eaa","scrollbarSlider.background":"#434c5e99","scrollbarSlider.hoverBackground":"#434c5eaa","selection.background":"#88c0d099","sideBar.background":"#2e3440","sideBar.foreground":"#d8dee9","sideBar.border":"#3b4252","sideBarSectionHeader.background":"#3b4252","sideBarSectionHeader.foreground":"#d8dee9","sideBarTitle.foreground":"#d8dee9","statusBar.background":"#3b4252","statusBar.debuggingBackground":"#5e81ac","statusBar.debuggingForeground":"#d8dee9","statusBar.noFolderForeground":"#d8dee9","statusBar.noFolderBackground":"#3b4252","statusBar.foreground":"#d8dee9","statusBarItem.activeBackground":"#4c566a","statusBarItem.hoverBackground":"#434c5e","statusBarItem.prominentBackground":"#3b4252","statusBarItem.prominentHoverBackground":"#434c5e","statusBarItem.errorBackground":"#3b4252","statusBarItem.errorForeground":"#bf616a","statusBarItem.warningBackground":"#ebcb8b","statusBarItem.warningForeground":"#2e3440","statusBar.border":"#3b425200","tab.activeBackground":"#3b4252","tab.activeForeground":"#d8dee9","tab.border":"#3b425200","tab.activeBorder":"#88c0d000","tab.unfocusedActiveBorder":"#88c0d000","tab.inactiveBackground":"#2e3440","tab.inactiveForeground":"#d8dee966","tab.unfocusedActiveForeground":"#d8dee999","tab.unfocusedInactiveForeground":"#d8dee966","tab.hoverBackground":"#3b4252cc","tab.unfocusedHoverBackground":"#3b4252b3","tab.hoverBorder":"#88c0d000","tab.unfocusedHoverBorder":"#88c0d000","tab.activeBorderTop":"#88c0d000","tab.unfocusedActiveBorderTop":"#88c0d000","tab.lastPinnedBorder":"#4c566a","terminal.background":"#2e3440","terminal.foreground":"#d8dee9","terminal.ansiBlack":"#3b4252","terminal.ansiRed":"#bf616a","terminal.ansiGreen":"#a3be8c","terminal.ansiYellow":"#ebcb8b","terminal.ansiBlue":"#81a1c1","terminal.ansiMagenta":"#b48ead","terminal.ansiCyan":"#88c0d0","terminal.ansiWhite":"#e5e9f0","terminal.ansiBrightBlack":"#4c566a","terminal.ansiBrightRed":"#bf616a","terminal.ansiBrightGreen":"#a3be8c","terminal.ansiBrightYellow":"#ebcb8b","terminal.ansiBrightBlue":"#81a1c1","terminal.ansiBrightMagenta":"#b48ead","terminal.ansiBrightCyan":"#8fbcbb","terminal.ansiBrightWhite":"#eceff4","terminal.tab.activeBorder":"#88c0d0","textBlockQuote.background":"#3b4252","textBlockQuote.border":"#81a1c1","textCodeBlock.background":"#4c566a","textLink.activeForeground":"#88c0d0","textLink.foreground":"#88c0d0","textPreformat.foreground":"#8fbcbb","textSeparator.foreground":"#eceff4","titleBar.activeBackground":"#2e3440","titleBar.activeForeground":"#d8dee9","titleBar.border":"#2e344000","titleBar.inactiveBackground":"#2e3440","titleBar.inactiveForeground":"#d8dee966","tree.indentGuidesStroke":"#616e88","walkThrough.embeddedEditorBackground":"#2e3440","welcomePage.buttonBackground":"#434c5e","welcomePage.buttonHoverBackground":"#4c566a","widget.shadow":"#00000066"},tokenColors:[{settings:{foreground:"#d8dee9ff",background:"#2e3440ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{name:"Comment",scope:"comment",settings:{foreground:"#616E88"}},{name:"Constant Character",scope:"constant.character",settings:{foreground:"#EBCB8B"}},{name:"Constant Character Escape",scope:"constant.character.escape",settings:{foreground:"#EBCB8B"}},{name:"Constant Language",scope:"constant.language",settings:{foreground:"#81A1C1"}},{name:"Constant Numeric",scope:"constant.numeric",settings:{foreground:"#B48EAD"}},{name:"Constant Regexp",scope:"constant.regexp",settings:{foreground:"#EBCB8B"}},{name:"Entity Name Class/Type",scope:["entity.name.class","entity.name.type.class"],settings:{foreground:"#8FBCBB"}},{name:"Entity Name Function",scope:"entity.name.function",settings:{foreground:"#88C0D0"}},{name:"Entity Name Tag",scope:"entity.name.tag",settings:{foreground:"#81A1C1"}},{name:"Entity Other Attribute Name",scope:"entity.other.attribute-name",settings:{foreground:"#8FBCBB"}},{name:"Entity Other Inherited Class",scope:"entity.other.inherited-class",settings:{fontStyle:"bold",foreground:"#8FBCBB"}},{name:"Invalid Deprecated",scope:"invalid.deprecated",settings:{foreground:"#D8DEE9",background:"#EBCB8B"}},{name:"Invalid Illegal",scope:"invalid.illegal",settings:{foreground:"#D8DEE9",background:"#BF616A"}},{name:"Keyword",scope:"keyword",settings:{foreground:"#81A1C1"}},{name:"Keyword Operator",scope:"keyword.operator",settings:{foreground:"#81A1C1"}},{name:"Keyword Other New",scope:"keyword.other.new",settings:{foreground:"#81A1C1"}},{name:"Markup Bold",scope:"markup.bold",settings:{fontStyle:"bold"}},{name:"Markup Changed",scope:"markup.changed",settings:{foreground:"#EBCB8B"}},{name:"Markup Deleted",scope:"markup.deleted",settings:{foreground:"#BF616A"}},{name:"Markup Inserted",scope:"markup.inserted",settings:{foreground:"#A3BE8C"}},{name:"Meta Preprocessor",scope:"meta.preprocessor",settings:{foreground:"#5E81AC"}},{name:"Punctuation",scope:"punctuation",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Parameters",scope:["punctuation.definition.method-parameters","punctuation.definition.function-parameters","punctuation.definition.parameters"],settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Tag",scope:"punctuation.definition.tag",settings:{foreground:"#81A1C1"}},{name:"Punctuation Definition Comment",scope:["punctuation.definition.comment","punctuation.end.definition.comment","punctuation.start.definition.comment"],settings:{foreground:"#616E88"}},{name:"Punctuation Section",scope:"punctuation.section",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Section Embedded",scope:["punctuation.section.embedded.begin","punctuation.section.embedded.end"],settings:{foreground:"#81A1C1"}},{name:"Punctuation Terminator",scope:"punctuation.terminator",settings:{foreground:"#81A1C1"}},{name:"Punctuation Variable",scope:"punctuation.definition.variable",settings:{foreground:"#81A1C1"}},{name:"Storage",scope:"storage",settings:{foreground:"#81A1C1"}},{name:"String",scope:"string",settings:{foreground:"#A3BE8C"}},{name:"String Regexp",scope:"string.regexp",settings:{foreground:"#EBCB8B"}},{name:"Support Class",scope:"support.class",settings:{foreground:"#8FBCBB"}},{name:"Support Constant",scope:"support.constant",settings:{foreground:"#81A1C1"}},{name:"Support Function",scope:"support.function",settings:{foreground:"#88C0D0"}},{name:"Support Function Construct",scope:"support.function.construct",settings:{foreground:"#81A1C1"}},{name:"Support Type",scope:"support.type",settings:{foreground:"#8FBCBB"}},{name:"Support Type Exception",scope:"support.type.exception",settings:{foreground:"#8FBCBB"}},{name:"Token Debug",scope:"token.debug-token",settings:{foreground:"#b48ead"}},{name:"Token Error",scope:"token.error-token",settings:{foreground:"#bf616a"}},{name:"Token Info",scope:"token.info-token",settings:{foreground:"#88c0d0"}},{name:"Token Warning",scope:"token.warn-token",settings:{foreground:"#ebcb8b"}},{name:"Variable",scope:"variable.other",settings:{foreground:"#D8DEE9"}},{name:"Variable Language",scope:"variable.language",settings:{foreground:"#81A1C1"}},{name:"Variable Parameter",scope:"variable.parameter",settings:{foreground:"#D8DEE9"}},{name:"[C/CPP] Punctuation Separator Pointer-Access",scope:"punctuation.separator.pointer-access.c",settings:{foreground:"#81A1C1"}},{name:"[C/CPP] Meta Preprocessor Include",scope:["source.c meta.preprocessor.include","source.c string.quoted.other.lt-gt.include"],settings:{foreground:"#8FBCBB"}},{name:"[C/CPP] Conditional Directive",scope:["source.cpp keyword.control.directive.conditional","source.cpp punctuation.definition.directive","source.c keyword.control.directive.conditional","source.c punctuation.definition.directive"],settings:{foreground:"#5E81AC",fontStyle:"bold"}},{name:"[CSS] Constant Other Color RGB Value",scope:"source.css constant.other.color.rgb-value",settings:{foreground:"#B48EAD"}},{name:"[CSS](Function) Meta Property-Value",scope:"source.css meta.property-value",settings:{foreground:"#88C0D0"}},{name:"[CSS] Media Queries",scope:["source.css keyword.control.at-rule.media","source.css keyword.control.at-rule.media punctuation.definition.keyword"],settings:{foreground:"#D08770"}},{name:"[CSS] Punctuation Definition Keyword",scope:"source.css punctuation.definition.keyword",settings:{foreground:"#81A1C1"}},{name:"[CSS] Support Type Property Name",scope:"source.css support.type.property-name",settings:{foreground:"#D8DEE9"}},{name:"[diff] Meta Range Context",scope:"source.diff meta.diff.range.context",settings:{foreground:"#8FBCBB"}},{name:"[diff] Meta Header From-File",scope:"source.diff meta.diff.header.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition From-File",scope:"source.diff punctuation.definition.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Range",scope:"source.diff punctuation.definition.range",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Separator",scope:"source.diff punctuation.definition.separator",settings:{foreground:"#81A1C1"}},{name:"[Elixir](JakeBecker.elixir-ls) module names",scope:"entity.name.type.module.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Elixir](JakeBecker.elixir-ls) module attributes",scope:"variable.other.readwrite.module.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) atoms",scope:"constant.other.symbol.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) modules",scope:"variable.other.constant.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Go] String Format Placeholder",scope:"source.go constant.other.placeholder.go",settings:{foreground:"#EBCB8B"}},{name:"[Java](JavaDoc) Comment Block Documentation HTML Entities",scope:"source.java comment.block.documentation.javadoc punctuation.definition.entity.html",settings:{foreground:"#81A1C1"}},{name:"[Java](JavaDoc) Constant Other",scope:"source.java constant.other",settings:{foreground:"#D8DEE9"}},{name:"[Java](JavaDoc) Keyword Other Documentation",scope:"source.java keyword.other.documentation",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Author",scope:"source.java keyword.other.documentation.author.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Directive/Custom",scope:["source.java keyword.other.documentation.directive","source.java keyword.other.documentation.custom"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation See",scope:"source.java keyword.other.documentation.see.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java] Meta Method-Call",scope:"source.java meta.method-call meta.method",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Meta Tag Template Link",scope:["source.java meta.tag.template.link.javadoc","source.java string.other.link.title.javadoc"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Meta Tag Template Value",scope:"source.java meta.tag.template.value.javadoc",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Punctuation Definition Keyword",scope:"source.java punctuation.definition.keyword.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Punctuation Definition Tag",scope:["source.java punctuation.definition.tag.begin.javadoc","source.java punctuation.definition.tag.end.javadoc"],settings:{foreground:"#616E88"}},{name:"[Java] Storage Modifier Import",scope:"source.java storage.modifier.import",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Modifier Package",scope:"source.java storage.modifier.package",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type",scope:"source.java storage.type",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Annotation",scope:"source.java storage.type.annotation",settings:{foreground:"#D08770"}},{name:"[Java] Storage Type Generic",scope:"source.java storage.type.generic",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Primitive",scope:"source.java storage.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Decorator",scope:["source.js punctuation.decorator","source.js meta.decorator variable.other.readwrite","source.js meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[JavaScript] Meta Object-Literal Key",scope:"source.js meta.object-literal.key",settings:{foreground:"#88C0D0"}},{name:"[JavaScript](JSDoc) Storage Type Class",scope:"source.js storage.type.class.jsdoc",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] String Template Literals Punctuation",scope:["source.js string.quoted.template punctuation.quasi.element.begin","source.js string.quoted.template punctuation.quasi.element.end","source.js string.template punctuation.definition.template-expression"],settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Interpolated String Template Punctuation Functions",scope:"source.js string.quoted.template meta.method-call.with-arguments",settings:{foreground:"#ECEFF4"}},{name:"[JavaScript] String Template Literal Variable",scope:["source.js string.template meta.template.expression support.variable.property","source.js string.template meta.template.expression variable.other.object"],settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Support Type Primitive",scope:"source.js support.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Variable Other Object",scope:"source.js variable.other.object",settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Variable Other Read-Write Alias",scope:"source.js variable.other.readwrite.alias",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] Parentheses in Template Strings",scope:["source.js meta.embedded.line meta.brace.square","source.js meta.embedded.line meta.brace.round","source.js string.quoted.template meta.brace.square","source.js string.quoted.template meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[HTML] Constant Character Entity",scope:"text.html.basic constant.character.entity.html",settings:{foreground:"#EBCB8B"}},{name:"[HTML] Constant Other Inline-Data",scope:"text.html.basic constant.other.inline-data",settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[HTML] Meta Tag SGML Doctype",scope:"text.html.basic meta.tag.sgml.doctype",settings:{foreground:"#5E81AC"}},{name:"[HTML] Punctuation Definition Entity",scope:"text.html.basic punctuation.definition.entity",settings:{foreground:"#81A1C1"}},{name:"[INI] Entity Name Section Group-Title",scope:"source.properties entity.name.section.group-title.ini",settings:{foreground:"#88C0D0"}},{name:"[INI] Punctuation Separator Key-Value",scope:"source.properties punctuation.separator.key-value.ini",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Fenced Code Block",scope:["text.html.markdown markup.fenced_code.block","text.html.markdown markup.fenced_code.block punctuation.definition"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Heading",scope:"markup.heading",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Inline",scope:["text.html.markdown markup.inline.raw","text.html.markdown markup.inline.raw punctuation.definition.raw"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Italic",scope:"text.html.markdown markup.italic",settings:{fontStyle:"italic"}},{name:"[Markdown] Markup Link",scope:"text.html.markdown markup.underline.link",settings:{fontStyle:"underline"}},{name:"[Markdown] Markup List Numbered/Unnumbered",scope:"text.html.markdown beginning.punctuation.definition.list",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown beginning.punctuation.definition.quote",settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown markup.quote",settings:{foreground:"#616E88"}},{name:"[Markdown] Markup Math Constant",scope:"text.html.markdown constant.character.math.tex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Math Definition Marker",scope:["text.html.markdown punctuation.definition.math.begin","text.html.markdown punctuation.definition.math.end"],settings:{foreground:"#5E81AC"}},{name:"[Markdown] Markup Math Function Definition Marker",scope:"text.html.markdown punctuation.definition.function.math.tex",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Math Operator",scope:"text.html.markdown punctuation.math.operator.latex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Heading",scope:"text.html.markdown punctuation.definition.heading",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Constant/String",scope:["text.html.markdown punctuation.definition.constant","text.html.markdown punctuation.definition.string"],settings:{foreground:"#81A1C1"}},{name:"[Markdown] String Other Link Description/Title",scope:["text.html.markdown constant.other.reference.link","text.html.markdown string.other.link.description","text.html.markdown string.other.link.title"],settings:{foreground:"#88C0D0"}},{name:"[Perl] Perl Sigils",scope:"source.perl punctuation.definition.variable",settings:{foreground:"#D8DEE9"}},{name:"[PHP] Meta Function-Call Object",scope:["source.php meta.function-call","source.php meta.function-call.object"],settings:{foreground:"#88C0D0"}},{name:"[Python] Decorator",scope:["source.python entity.name.function.decorator","source.python meta.function.decorator support.type"],settings:{foreground:"#D08770"}},{name:"[Python] Function Call",scope:"source.python meta.function-call.generic",settings:{foreground:"#88C0D0"}},{name:"[Python] Support Type",scope:"source.python support.type",settings:{foreground:"#88C0D0"}},{name:"[Python] Function Parameter",scope:["source.python variable.parameter.function.language"],settings:{foreground:"#D8DEE9"}},{name:"[Python] Function Parameter Special",scope:["source.python meta.function.parameters variable.parameter.function.language.special.self"],settings:{foreground:"#81A1C1"}},{name:"[Rust] Entity types",scope:"source.rust entity.name.type",settings:{foreground:"#8FBCBB"}},{name:"[Rust] Macro",scope:"source.rust meta.macro entity.name.function",settings:{fontStyle:"bold",foreground:"#88C0D0"}},{name:"[Rust] Attributes",scope:["source.rust meta.attribute","source.rust meta.attribute punctuation","source.rust meta.attribute keyword.operator"],settings:{foreground:"#5E81AC"}},{name:"[Rust] Traits",scope:"source.rust entity.name.type.trait",settings:{fontStyle:"bold"}},{name:"[Rust] Interpolation Bracket Curly",scope:"source.rust punctuation.definition.interpolation",settings:{foreground:"#EBCB8B"}},{name:"[SCSS] Punctuation Definition Interpolation Bracket Curly",scope:["source.css.scss punctuation.definition.interpolation.begin.bracket.curly","source.css.scss punctuation.definition.interpolation.end.bracket.curly"],settings:{foreground:"#81A1C1"}},{name:"[SCSS] Variable Interpolation",scope:"source.css.scss variable.interpolation",settings:{foreground:"#D8DEE9",fontStyle:"italic"}},{name:"[TypeScript] Decorators",scope:["source.ts punctuation.decorator","source.ts meta.decorator variable.other.readwrite","source.ts meta.decorator entity.name.function","source.tsx punctuation.decorator","source.tsx meta.decorator variable.other.readwrite","source.tsx meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[TypeScript] Object-literal keys",scope:["source.ts meta.object-literal.key","source.tsx meta.object-literal.key"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Object-literal functions",scope:["source.ts meta.object-literal.key entity.name.function","source.tsx meta.object-literal.key entity.name.function"],settings:{foreground:"#88C0D0"}},{name:"[TypeScript] Type/Class",scope:["source.ts support.class","source.ts support.type","source.ts entity.name.type","source.ts entity.name.class","source.tsx support.class","source.tsx support.type","source.tsx entity.name.type","source.tsx entity.name.class"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Static Class Support",scope:["source.ts support.constant.math","source.ts support.constant.dom","source.ts support.constant.json","source.tsx support.constant.math","source.tsx support.constant.dom","source.tsx support.constant.json"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Variables",scope:["source.ts support.variable","source.tsx support.variable"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Parentheses in Template Strings",scope:["source.ts meta.embedded.line meta.brace.square","source.ts meta.embedded.line meta.brace.round","source.tsx meta.embedded.line meta.brace.square","source.tsx meta.embedded.line meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[XML] Entity Name Tag Namespace",scope:"text.xml entity.name.tag.namespace",settings:{foreground:"#8FBCBB"}},{name:"[XML] Keyword Other Doctype",scope:"text.xml keyword.other.doctype",settings:{foreground:"#5E81AC"}},{name:"[XML] Meta Tag Preprocessor",scope:"text.xml meta.tag.preprocessor entity.name.tag",settings:{foreground:"#5E81AC"}},{name:"[XML] Entity Name Tag Namespace",scope:["text.xml string.unquoted.cdata","text.xml string.unquoted.cdata punctuation.definition.string"],settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[YAML] Entity Name Tag",scope:"source.yaml entity.name.tag",settings:{foreground:"#8FBCBB"}}]},autoImport:!0,showCopyButton:!0,enableSpa:!0,skipLanguages:[],filepath:"/Users/bytedance/modern.js/website/module-tools/docs/zh/guide/modify-output-product.md"},f=void 0,h=[{id:"\u9ED8\u8BA4\u8F93\u51FA\u4EA7\u7269",text:"\u9ED8\u8BA4\u8F93\u51FA\u4EA7\u7269",depth:2},{id:"\u6784\u5EFA\u9884\u8BBE",text:"\u6784\u5EFA\u9884\u8BBE",depth:2},{id:"\u6784\u5EFA\u9884\u8BBE\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F",text:"\u6784\u5EFA\u9884\u8BBE\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F",depth:3},{id:"\u6784\u5EFA\u9884\u8BBE\u7684\u51FD\u6570\u5F62\u5F0F",text:"\u6784\u5EFA\u9884\u8BBE\u7684\u51FD\u6570\u5F62\u5F0F",depth:3},{id:"\u6784\u5EFA\u914D\u7F6E\u5BF9\u8C61",text:"\u6784\u5EFA\u914D\u7F6E\uFF08\u5BF9\u8C61\uFF09",depth:2},{id:"\u4EC0\u4E48\u65F6\u5019\u4F7F\u7528-buildconfig",text:"\u4EC0\u4E48\u65F6\u5019\u4F7F\u7528 buildConfig",depth:2}],b="\u4FEE\u6539\u8F93\u51FA\u4EA7\u7269";function c(t){const e=Object.assign({h1:"h1",a:"a",h2:"h2",p:"p",code:"code",strong:"strong",ul:"ul",li:"li",div:"div",ol:"ol",h3:"h3",blockquote:"blockquote",em:"em"},t.components);return r||a("CH",!1),r.Code||a("CH.Code",!0),n(d,{children:[n(e.h1,{id:"\u4FEE\u6539\u8F93\u51FA\u4EA7\u7269",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u4FEE\u6539\u8F93\u51FA\u4EA7\u7269",children:"#"}),"\u4FEE\u6539\u8F93\u51FA\u4EA7\u7269"]}),`
|
|
2
|
+
`,n(e.h2,{id:"\u9ED8\u8BA4\u8F93\u51FA\u4EA7\u7269",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u9ED8\u8BA4\u8F93\u51FA\u4EA7\u7269",children:"#"}),"\u9ED8\u8BA4\u8F93\u51FA\u4EA7\u7269"]}),`
|
|
3
|
+
`,n(e.p,{children:["\u5F53\u5728\u521D\u59CB\u5316\u7684\u9879\u76EE\u91CC\u4F7F\u7528 ",o(e.code,{children:"modern build"})," \u547D\u4EE4\u7684\u65F6\u5019\uFF0C\u4F1A\u6839\u636E Module Tools \u9ED8\u8BA4\u652F\u6301\u7684\u914D\u7F6E\u751F\u6210\u76F8\u5E94\u7684\u4EA7\u7269\u3002\u9ED8\u8BA4\u652F\u6301\u7684\u914D\u7F6E\u5177\u4F53\u5982\u4E0B\uFF1A"]}),`
|
|
4
|
+
`,o(r.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@modern-js/module-tools",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildPreset",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"base-config",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"typescript"},annotations:[]}]}),`
|
|
5
|
+
`,n(e.p,{children:[o(e.strong,{children:"\u9ED8\u8BA4\u751F\u6210\u4EA7\u7269\u5177\u6709\u4EE5\u4E0B\u7279\u70B9"}),"\uFF1A"]}),`
|
|
6
|
+
`,n(e.ul,{children:[`
|
|
7
|
+
`,n(e.li,{children:["\u4EE3\u7801\u683C\u5F0F\u4E3A ",o(e.a,{href:"https://nodejs.org/api/modules.html#modules-commonjs-modules",target:"_blank",rel:"nofollow",children:"CommonJS"}),"\uFF0C\u6216\u8005\u7B80\u79F0\u4E3A ",o(e.code,{children:"cjs"}),"\u3002"]}),`
|
|
8
|
+
`,n(e.li,{children:["\u4EE3\u7801\u8BED\u6CD5\u652F\u6301\u5230 ",o(e.code,{children:"ES6"}),"\u3002"]}),`
|
|
9
|
+
`,n(e.li,{children:["\u6240\u6709\u7684\u4EE3\u7801\u7ECF\u8FC7\u6253\u5305\u53D8\u6210\u4E86\u4E00\u4E2A\u6587\u4EF6\uFF0C\u5373\u8FDB\u884C\u4E86 ",o(e.strong,{children:"bundle"})," \u5904\u7406\u3002"]}),`
|
|
10
|
+
`,n(e.li,{children:["\u4EA7\u7269\u8F93\u51FA\u6839\u76EE\u5F55\u4E3A\u9879\u76EE\u4E0B\u7684 ",o(e.code,{children:"dist"})," \u76EE\u5F55\uFF0C\u7C7B\u578B\u6587\u4EF6\u8F93\u51FA\u7684\u76EE\u5F55\u4E3A ",o(e.code,{children:"dist/types"}),"\u3002"]}),`
|
|
11
|
+
`]}),`
|
|
12
|
+
`,n(e.div,{className:"island-directive tip",children:[o(e.p,{className:"island-directive-title",children:"TIP"}),o(e.div,{className:"island-directive-content",children:n(e.ol,{children:[`
|
|
13
|
+
`,n(e.li,{children:["\u6240\u8C13\u201C\u4EE3\u7801\u8BED\u6CD5\u652F\u6301\u5230 ES6\u201D\u7684\u610F\u601D\u662F\u6307\uFF1A\u4EA7\u7269\u4EE3\u7801\u6240\u652F\u6301\u7684\u8BED\u6CD5\u4E0D\u4F1A\u8D85\u8FC7 ",o(e.code,{children:"ES6"}),"\u3002\u5982\u679C\u6E90\u7801\u4E2D\u4F7F\u7528\u8BED\u6CD5\u662F ",o(e.code,{children:"ES6"})," \u4EE5\u4E0A\u7684\u8BED\u6CD5\uFF08\u4F8B\u5982 ",o(e.code,{children:"ES2017"}),"\uFF09\uFF0C\u5219\u4F1A\u88AB\u8FDB\u884C\u8F6C\u6362\u3002"]}),`
|
|
14
|
+
`]})})]}),`
|
|
15
|
+
`,o(e.p,{children:"\u770B\u5230\u8FD9\u91CC\u4F60\u53EF\u80FD\u4F1A\u6709\u4EE5\u4E0B\u7591\u95EE\uFF1A"}),`
|
|
16
|
+
`,n(e.ol,{children:[`
|
|
17
|
+
`,n(e.li,{children:[o(e.code,{children:"buildPreset"})," \u662F\u4EC0\u4E48\uFF1F"]}),`
|
|
18
|
+
`,o(e.li,{children:"\u4EA7\u7269\u7684\u8FD9\u4E9B\u7279\u70B9\u662F\u7531\u4EC0\u4E48\u51B3\u5B9A\u7684\uFF1F"}),`
|
|
19
|
+
`]}),`
|
|
20
|
+
`,n(e.p,{children:["\u90A3\u4E48\u63A5\u4E0B\u6765\u9996\u5148\u89E3\u91CA\u4E00\u4E0B ",o(e.code,{children:"buildPreset"}),"\u3002"]}),`
|
|
21
|
+
`,n(e.h2,{id:"\u6784\u5EFA\u9884\u8BBE",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u6784\u5EFA\u9884\u8BBE",children:"#"}),"\u6784\u5EFA\u9884\u8BBE"]}),`
|
|
22
|
+
`,n(e.p,{children:[o(e.code,{children:"buildPreset"})," \u4EE3\u8868\u7740\u63D0\u524D\u51C6\u5907\u597D\u7684\u4E00\u7EC4\u6216\u8005\u591A\u7EC4\u6784\u5EFA\u76F8\u5173\u7684\u914D\u7F6E\uFF0C\u53EA\u9700\u8981\u4F7F\u7528 ",o(e.code,{children:"buildPreset"})," \u5BF9\u5E94\u7684\u9884\u8BBE\u503C\uFF0C\u5C31\u53EF\u4EE5\u7701\u53BB\u9EBB\u70E6\u4E14\u590D\u6742\u7684\u914D\u7F6E\u5DE5\u4F5C\uFF0C\u5F97\u5230\u7B26\u5408\u9884\u671F\u7684\u4EA7\u7269\u3002"]}),`
|
|
23
|
+
`,n(e.h3,{id:"\u6784\u5EFA\u9884\u8BBE\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u6784\u5EFA\u9884\u8BBE\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F",children:"#"}),"\u6784\u5EFA\u9884\u8BBE\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F"]}),`
|
|
24
|
+
`,n(e.p,{children:[o(e.strong,{children:"\u6784\u5EFA\u9884\u8BBE\u7684\u503C\u53EF\u4EE5\u662F\u5B57\u7B26\u4E32\u5F62\u5F0F"}),"\uFF0C\u56E0\u6B64\u8FD9\u6837\u5F62\u5F0F\u7684\u6784\u5EFA\u9884\u8BBE\u53EB\u505A\u9884\u8BBE\u5B57\u7B26\u4E32\u3002"]}),`
|
|
25
|
+
`,n(e.p,{children:["\u6A21\u5757\u5DE5\u7A0B\u89E3\u51B3\u65B9\u6848\u6839\u636E npm \u5305\u4F7F\u7528\u7684\u901A\u7528\u573A\u666F\uFF0C\u63D0\u4F9B\u4E86\u901A\u7528\u7684\u6784\u5EFA\u9884\u8BBE\u5B57\u7B26\u4E32\u4EE5\u53CA\u76F8\u5E94\u7684\u53D8\u4F53\u3002\u76EE\u524D\u652F\u6301\u7684\u6240\u6709\u9884\u8BBE\u5B57\u7B26\u4E32\u53EF\u4EE5\u901A\u8FC7 ",o(e.a,{href:"/zh/api/build-config.html",children:"BuildPreset API"})," \u67E5\u770B\u3002\u8FD9\u91CC\u8BB2\u89E3\u4E00\u4E0B\u5173\u4E8E",o(e.strong,{children:"\u901A\u7528\u7684\u9884\u8BBE\u5B57\u7B26\u4E32\u4E0E\u53D8\u4F53\u4E4B\u95F4\u7684\u5173\u7CFB"}),"\u3002"]}),`
|
|
26
|
+
`,n(e.p,{children:["\u5728\u901A\u7528\u7684\u9884\u8BBE\u5B57\u7B26\u4E32\u4E2D\uFF0C",o(e.code,{children:'"npm-library"'})," \u53EF\u4EE5\u7528\u4E8E\u5728\u5F00\u53D1\u5E93\u7C7B\u578B\u7684 npm \u5305\u7684\u573A\u666F\u4E0B\u4F7F\u7528\uFF0C\u5B83\u9002\u5408\u5927\u591A\u6570\u666E\u901A\u7684\u6A21\u5757\u7C7B\u578B\u9879\u76EE\u3002\u5F53\u8BBE\u7F6E ",o(e.code,{children:'"npm-library"'})," \u7684\u65F6\u5019\uFF0C\u9879\u76EE\u7684\u8F93\u51FA\u4EA7\u7269\u4F1A\u6709\u4EE5\u4E0B\u7279\u70B9\uFF1A"]}),`
|
|
27
|
+
`,n(e.ul,{children:[`
|
|
28
|
+
`,n(e.li,{children:["\u5728 ",o(e.code,{children:"dist/lib"})," \u76EE\u5F55\u4E0B\u4F1A\u5F97\u5230\u4EE3\u7801\u683C\u5F0F\u4E3A ",o(e.code,{children:"cjs"}),"\u3001\u8BED\u6CD5\u652F\u6301\u5230 ",o(e.code,{children:"es6"})," \u4E14\u7ECF\u8FC7\u6253\u5305\u5904\u7406\u540E\u7684\u4EA7\u7269\u3002"]}),`
|
|
29
|
+
`,n(e.li,{children:["\u5728 ",o(e.code,{children:"dist/es"})," \u76EE\u5F55\u4E0B\u4F1A\u5F97\u5230\u4EE3\u7801\u683C\u5F0F\u4E3A ",o(e.code,{children:"esm"}),"\u3001\u8BED\u6CD5\u652F\u6301\u4E3A ",o(e.code,{children:"es6"})," \u4E14\u7ECF\u8FC7\u6253\u5305\u5904\u7406\u540E\u7684\u4EA7\u7269\u3002"]}),`
|
|
30
|
+
`,n(e.li,{children:["\u5728 ",o(e.code,{children:"dist/types"})," \u76EE\u5F55\u4E0B\u4F1A\u5F97\u5230\u7C7B\u578B\u6587\u4EF6\u3002\u5982\u679C\u4E0D\u662F TypeScript \u9879\u76EE\uFF0C\u5219\u6CA1\u6709\u8BE5\u76EE\u5F55\u3002"]}),`
|
|
31
|
+
`]}),`
|
|
32
|
+
`,n(e.p,{children:["\u800C\u9884\u8BBE\u5B57\u7B26\u4E32 ",o(e.code,{children:'"npm-library"'})," \u5BF9\u5E94\u7684\u53D8\u4F53\u5219\u662F\u5728\u539F\u672C\u4EA7\u7269\u7684\u57FA\u7840\u4E0A\u4FEE\u6539\u4E86",o(e.strong,{children:"\u4EE3\u7801\u8BED\u6CD5\u652F\u6301"}),"\u8FD9\u4E00\u7279\u70B9\uFF0C\u540C\u65F6\u5728\u5B57\u7B26\u4E32\u547D\u540D\u4E0A\u4E5F\u53D8\u4E3A\u4E86 ",o(e.code,{children:'"npm-library-[es5 | es2016...es2020 | esnext]"'})," \u8FD9\u6837\u7684\u5F62\u5F0F\u3002"]}),`
|
|
33
|
+
`,n(e.p,{children:["\u4F8B\u5982\uFF0C\u5982\u679C\u5728\u9884\u8BBE\u5B57\u7B26\u4E32 ",o(e.code,{children:'"npm-library"'})," \u5BF9\u5E94\u7684\u8F93\u51FA\u4EA7\u7269\u57FA\u7840\u4E0A\uFF0C\u8BA9\u4EA7\u7269\u4EE3\u7801\u652F\u6301\u7684\u8BED\u6CD5\u53D8\u4E3A ",o(e.code,{children:"es2017"})," \u7684\u8BDD\uFF0C\u90A3\u4E48\u53EA\u9700\u8981\u5C06 ",o(e.code,{children:'"npm-library"'})," \u6539\u53D8\u4E3A ",o(e.code,{children:'"npm-library-es2017"'})," \u5C31\u53EF\u4EE5\u4E86\u3002"]}),`
|
|
34
|
+
`,n(e.h3,{id:"\u6784\u5EFA\u9884\u8BBE\u7684\u51FD\u6570\u5F62\u5F0F",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u6784\u5EFA\u9884\u8BBE\u7684\u51FD\u6570\u5F62\u5F0F",children:"#"}),"\u6784\u5EFA\u9884\u8BBE\u7684\u51FD\u6570\u5F62\u5F0F"]}),`
|
|
35
|
+
`,n(e.p,{children:[o(e.strong,{children:"\u9664\u4E86\u5B57\u7B26\u4E32\u5F62\u5F0F\u4EE5\u5916\uFF0C\u6784\u5EFA\u9884\u8BBE\u7684\u503C\u4E5F\u53EF\u4EE5\u662F\u51FD\u6570\u5F62\u5F0F\uFF0C\u5728\u51FD\u6570\u4E2D\u53EF\u4EE5\u6253\u5370\u6216\u8005\u4FEE\u6539\u67D0\u4E2A\u9884\u8BBE\u503C\u5BF9\u5E94\u7684\u5177\u4F53\u914D\u7F6E"}),"\u3002"]}),`
|
|
36
|
+
`,n(e.p,{children:["\u4F8B\u5982\uFF0C\u5982\u679C\u4F7F\u7528\u9884\u8BBE\u51FD\u6570\u7684\u5F62\u5F0F\u8FBE\u5230\u9884\u8BBE\u5B57\u7B26\u4E32 ",o(e.code,{children:'"npm-library-es2017"'})," \u540C\u6837\u7684\u6548\u679C\uFF0C\u53EF\u4EE5\u6309\u7167\u5982\u4E0B\u7684\u65B9\u5F0F\uFF1A"]}),`
|
|
37
|
+
`,o(r.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"@modern-js/module-tools",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildPreset",props:{style:{color:"#88C0D0"}}},{content:"({",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"preset",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"})",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"return",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"preset",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"NPM_LIBRARY",props:{style:{color:"#D8DEE9"}}},{content:".",props:{style:{color:"#ECEFF4"}}},{content:"map",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"config",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"return",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"...",props:{style:{color:"#81A1C1"}}},{content:"config",props:{style:{color:"#D8DEE9"}}},{content:",",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"target",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"es2017",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"},",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"typescript"},annotations:[]}]}),`
|
|
38
|
+
`,n(e.p,{children:["\u5728\u4E0A\u9762\u7684\u4EE3\u7801\u5B9E\u73B0\u4E2D\uFF0C",o(e.code,{children:"preset.NPM_LIBRARY"})," \u4E0E\u9884\u8BBE\u5B57\u7B26\u4E32 ",o(e.code,{children:'"npm-library"'})," \u662F\u76F8\u5BF9\u5E94\u7684\uFF0C\u5B83\u4EE3\u8868\u7740 ",o(e.code,{children:'"npm-library"'})," \u7B49\u4EF7\u7684\u591A\u7EC4\u6784\u5EFA\u76F8\u5173\u7684\u914D\u7F6E\u3002\u6211\u4EEC\u901A\u8FC7 ",o(e.code,{children:"map"})," \u65B9\u6CD5\u904D\u5386\u4E86 ",o(e.code,{children:"NPM_LIBRARY"})," \u8FD9\u4E2A\u6570\u7EC4\uFF0C\u5728\u8FD9\u4E2A\u6570\u7EC4\u4E2D\u5305\u542B\u4E86\u591A\u4E2A ",o(e.code,{children:"buildConfig"})," \u5BF9\u8C61\u3002\u6211\u4EEC\u5C06\u539F\u672C\u7684 ",o(e.code,{children:"buildConfig"})," \u5BF9\u8C61\u8FDB\u884C\u4E86\u6D45\u62F7\u8D1D\u5E76\u4FEE\u6539\u4E86\u6D45\u62F7\u8D1D\u540E\u5F97\u5230 ",o(e.code,{children:"buildConfig.target"}),"\uFF0C\u5C06\u5B83\u6307\u5B9A\u4E3A ",o(e.code,{children:"es2017"}),"\u3002"]}),`
|
|
39
|
+
`,n(e.blockquote,{children:[`
|
|
40
|
+
`,n(e.p,{children:["\u5173\u4E8E ",o(e.code,{children:"preset.NPM_LIBRARY"})," \u5177\u4F53\u5BF9\u5E94\u7684\u503C\uFF0C\u53EF\u4EE5\u901A\u8FC7 ",o(e.a,{href:"/zh/api/build-config.html",children:"BuildPreset API"})," \u67E5\u770B\u3002\u5728 ",o(e.code,{children:"preset"})," \u5BF9\u8C61\u4E0B\u4E0D\u4EC5\u5305\u542B\u4E86 ",o(e.code,{children:"NPM_LIBRARY"}),"\uFF0C\u8FD8\u5305\u542B\u4E86\u5176\u4ED6\u7C7B\u4F3C\u7684\u5E38\u91CF\u3002"]}),`
|
|
41
|
+
`]}),`
|
|
42
|
+
`,n(e.p,{children:["\u90A3\u4E48\u8FD9\u91CC\u7684 ",o(e.code,{children:"buildConfig"})," \u5BF9\u8C61\u662F\u4EC0\u4E48\u5462\uFF1F\u4E4B\u524D\u63D0\u5230\u7684\u6784\u5EFA\u4EA7\u7269\u7279\u70B9\u53C8\u662F\u6839\u636E\u4EC0\u4E48\u5462\uFF1F"]}),`
|
|
43
|
+
`,o(e.p,{children:"\u63A5\u4E0B\u6765\u6211\u4EEC\u89E3\u91CA\u4E00\u4E0B\u3002"}),`
|
|
44
|
+
`,n(e.h2,{id:"\u6784\u5EFA\u914D\u7F6E\u5BF9\u8C61",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u6784\u5EFA\u914D\u7F6E\u5BF9\u8C61",children:"#"}),"\u6784\u5EFA\u914D\u7F6E\uFF08\u5BF9\u8C61\uFF09"]}),`
|
|
45
|
+
`,n(e.p,{children:[n(e.strong,{children:[o(e.code,{children:"buildConfig"})," \u662F\u4E00\u4E2A\u7528\u6765\u63CF\u8FF0\u5982\u4F55\u7F16\u8BD1\u3001\u751F\u6210\u6784\u5EFA\u4EA7\u7269\u7684\u914D\u7F6E\u5BF9\u8C61"]}),"\u3002\u5728\u6700\u5F00\u59CB\u63D0\u5230\u7684\u5173\u4E8E\u201C",o(e.em,{children:"\u6784\u5EFA\u4EA7\u7269\u7684\u7279\u70B9"}),"\u201D\uFF0C\u5176\u5B9E\u90FD\u662F ",o(e.code,{children:"buildConfig"})," \u6240\u652F\u6301\u7684\u5C5E\u6027\u3002\u76EE\u524D\u6240\u652F\u6301\u7684\u5C5E\u6027\u8986\u76D6\u4E86\u5927\u90E8\u5206\u6A21\u5757\u7C7B\u578B\u9879\u76EE\u5728\u6784\u5EFA\u4EA7\u7269\u65F6\u7684\u9700\u6C42\uFF0C",o(e.code,{children:"buildConfig"})," \u4E0D\u4EC5\u5305\u542B\u4E00\u4E9B\u4EA7\u7269\u6240\u5177\u5907\u7684\u5C5E\u6027\uFF0C\u4E5F\u5305\u542B\u4E86\u6784\u5EFA\u4EA7\u7269\u6240\u9700\u8981\u7684\u4E00\u4E9B\u7279\u6027\u529F\u80FD\u3002\u63A5\u4E0B\u6765\u4ECE\u5206\u7C7B\u7684\u89D2\u5EA6\u7B80\u5355\u7F57\u5217\u4E00\u4E0B\uFF1A"]}),`
|
|
46
|
+
`,o(e.p,{children:o(e.strong,{children:"\u6784\u5EFA\u4EA7\u7269\u7684\u57FA\u672C\u5C5E\u6027\u5305\u62EC\uFF1A"})}),`
|
|
47
|
+
`,n(e.ul,{children:[`
|
|
48
|
+
`,n(e.li,{children:["\u4EA7\u7269\u662F\u5426\u88AB\u6253\u5305\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#buildtype",children:o(e.code,{children:"buildConfig.buildType"})}),"\u3002"]}),`
|
|
49
|
+
`,n(e.li,{children:["\u4EA7\u7269\u5BF9\u4E8E\u8BED\u6CD5\u7684\u652F\u6301\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#target",children:o(e.code,{children:"buildConfig.target"})}),"\u3002"]}),`
|
|
50
|
+
`,n(e.li,{children:["\u4EA7\u7269\u683C\u5F0F\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#format",children:o(e.code,{children:"buildConfig.format"})}),"\u3002"]}),`
|
|
51
|
+
`,n(e.li,{children:["\u4EA7\u7269\u7C7B\u578B\u6587\u4EF6\u5982\u4F55\u5904\u7406\uFF0C\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#dts",children:o(e.code,{children:"buildConfig.dts"})}),"\u3002"]}),`
|
|
52
|
+
`,n(e.li,{children:["\u4EA7\u7269\u7684 sourceMap \u5982\u4F55\u5904\u7406\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#sourcemap",children:o(e.code,{children:"buildConfig.sourceMap"})}),"\u3002"]}),`
|
|
53
|
+
`,n(e.li,{children:["\u4EA7\u7269\u5BF9\u5E94\u7684\u8F93\u5165\uFF08\u6216\u8005\u662F\u6E90\u6587\u4EF6\uFF09\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#input",children:o(e.code,{children:"buildConfig.input"})}),"\u3002"]}),`
|
|
54
|
+
`,n(e.li,{children:["\u4EA7\u7269\u8F93\u51FA\u7684\u76EE\u5F55\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#outdir",children:o(e.code,{children:"buildConfig.outdir"})}),"\u3002"]}),`
|
|
55
|
+
`,n(e.li,{children:["\u6784\u5EFA\u7684\u6E90\u7801\u76EE\u5F55\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#sourcedir",children:o(e.code,{children:"buildConfig.sourceDir"})}),"\u3002"]}),`
|
|
56
|
+
`]}),`
|
|
57
|
+
`,o(e.p,{children:o(e.strong,{children:"\u6784\u5EFA\u4EA7\u7269\u6240\u9700\u7684\u5E38\u7528\u529F\u80FD\u5305\u62EC\uFF1A"})}),`
|
|
58
|
+
`,n(e.ul,{children:[`
|
|
59
|
+
`,n(e.li,{children:["\u522B\u540D\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#alias",children:o(e.code,{children:"buildConfig.alias"})}),"\u3002"]}),`
|
|
60
|
+
`,n(e.li,{children:["\u9759\u6001\u8D44\u6E90\u5904\u7406\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#asset",children:o(e.code,{children:"buildConfig.asset"})}),"\u3002"]}),`
|
|
61
|
+
`,n(e.li,{children:["\u7B2C\u4E09\u65B9\u4F9D\u8D56\u5904\u7406\uFF1A\u5BF9\u5E94\u7684 API \u6709\uFF1A",`
|
|
62
|
+
`,n(e.ul,{children:[`
|
|
63
|
+
`,n(e.li,{children:[o(e.a,{href:"/zh/api/build-config.html#autoexternal",children:o(e.code,{children:"buildConfig.autoExternal"})}),"\u3002"]}),`
|
|
64
|
+
`,n(e.li,{children:[o(e.a,{href:"/zh/api/build-config.html#externals",children:o(e.code,{children:"buildConfig.externals"})}),"\u3002"]}),`
|
|
65
|
+
`]}),`
|
|
66
|
+
`]}),`
|
|
67
|
+
`,n(e.li,{children:["\u62F7\u8D1D\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#copy",children:o(e.code,{children:"buildConfig.copy"})}),"\u3002"]}),`
|
|
68
|
+
`,n(e.li,{children:["\u5168\u5C40\u53D8\u91CF\u66FF\u6362\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#define",children:o(e.code,{children:"buildConfig.define"})}),"\u3002"]}),`
|
|
69
|
+
`,n(e.li,{children:["\u6307\u5B9A ",o(e.a,{href:"https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html",target:"_blank",rel:"nofollow",children:"JSX"})," \u7F16\u8BD1\u65B9\u5F0F\uFF0C\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#jsx",children:o(e.code,{children:"buildConfig.jsx"})}),"\u3002"]}),`
|
|
70
|
+
`]}),`
|
|
71
|
+
`,o(e.p,{children:o(e.strong,{children:"\u4E00\u4E9B\u9AD8\u7EA7\u5C5E\u6027\u6216\u8005\u4F7F\u7528\u9891\u7387\u4E0D\u9AD8\u7684\u529F\u80FD\uFF1A"})}),`
|
|
72
|
+
`,n(e.ul,{children:[`
|
|
73
|
+
`,n(e.li,{children:["\u4EA7\u7269\u4EE3\u7801\u538B\u7F29\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#minify",children:o(e.code,{children:"buildConfig.minify"})}),"\u3002"]}),`
|
|
74
|
+
`,n(e.li,{children:["\u4EE3\u7801\u5206\u5272\uFF1A",o(e.a,{href:"/zh/api/build-config.html#splitting",children:o(e.code,{children:"buildConfig.spitting"})})]}),`
|
|
75
|
+
`,n(e.li,{children:["\u6307\u5B9A\u6784\u5EFA\u4EA7\u7269\u7528\u4E8E NodeJS \u73AF\u5883\u8FD8\u662F\u6D4F\u89C8\u5668\u73AF\u5883\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#platform",children:o(e.code,{children:"buildConfig.platform"})}),"\u3002"]}),`
|
|
76
|
+
`,n(e.li,{children:["umd \u4EA7\u7269\u76F8\u5173\uFF1A",`
|
|
77
|
+
`,n(e.ul,{children:[`
|
|
78
|
+
`,n(e.li,{children:["\u6307\u5B9A umd \u4EA7\u7269\u5916\u90E8\u5BFC\u5165\u7684\u5168\u5C40\u53D8\u91CF\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#umdglobals",children:o(e.code,{children:"buildConfig.umdGlobals"})}),"\u3002"]}),`
|
|
79
|
+
`,n(e.li,{children:["\u6307\u5B9A umd \u4EA7\u7269\u7684\u6A21\u5757\u540D\uFF1A\u5BF9\u5E94\u7684 API \u662F ",o(e.a,{href:"/zh/api/build-config.html#umdmodulename",children:o(e.code,{children:"buildConfig.umdModuleName"})}),"\u3002"]}),`
|
|
80
|
+
`]}),`
|
|
81
|
+
`]}),`
|
|
82
|
+
`]}),`
|
|
83
|
+
`,o(e.p,{children:"\u9664\u4E86\u4EE5\u4E0A\u5206\u7C7B\u4EE5\u5916\uFF0C\u5173\u4E8E\u8FD9\u4E9B API \u7684\u5E38\u89C1\u95EE\u9898\u548C\u6700\u4F73\u5B9E\u8DF5\u53EF\u4EE5\u901A\u8FC7\u4E0B\u9762\u7684\u94FE\u63A5\u6765\u4E86\u89E3\uFF1A"}),`
|
|
84
|
+
`,n(e.ul,{children:[`
|
|
85
|
+
`,n(e.li,{children:["\u4EC0\u4E48\u662F ",o(e.code,{children:"bundle"})," \u548C ",o(e.code,{children:"bundleless"}),"?"]}),`
|
|
86
|
+
`,n(e.li,{children:[o(e.code,{children:"input"})," \u4E0E ",o(e.code,{children:"sourceDir"})," \u7684\u5173\u7CFB\u3002"]}),`
|
|
87
|
+
`,o(e.li,{children:"\u4EA7\u7269\u4E2D\u7C7B\u578B\u6587\u4EF6\u7684\u591A\u79CD\u751F\u6210\u65B9\u5F0F\u3002"}),`
|
|
88
|
+
`,n(e.li,{children:[o(e.code,{children:"buildConfig.define"})," \u4E0D\u540C\u573A\u666F\u7684\u4F7F\u7528\u65B9\u5F0F\u3002"]}),`
|
|
89
|
+
`,o(e.li,{children:"\u5982\u4F55\u5904\u7406\u7B2C\u4E09\u65B9\u4F9D\u8D56\uFF1F"}),`
|
|
90
|
+
`,o(e.li,{children:"\u5982\u4F55\u4F7F\u7528\u62F7\u8D1D\uFF1F"}),`
|
|
91
|
+
`,o(e.li,{children:"\u5982\u4F55\u6784\u5EFA umd \u4EA7\u7269\uFF1F"}),`
|
|
92
|
+
`,o(e.li,{children:"\u9759\u6001\u8D44\u6E90\u76EE\u524D\u6240\u652F\u6301\u7684\u80FD\u529B\u3002"}),`
|
|
93
|
+
`]}),`
|
|
94
|
+
`,n(e.h2,{id:"\u4EC0\u4E48\u65F6\u5019\u4F7F\u7528-buildconfig",children:[o(e.a,{className:"header-anchor","aria-hidden":"true",href:"#\u4EC0\u4E48\u65F6\u5019\u4F7F\u7528-buildconfig",children:"#"}),"\u4EC0\u4E48\u65F6\u5019\u4F7F\u7528 ",o(e.code,{children:"buildConfig"})]}),`
|
|
95
|
+
`,n(e.p,{children:[o(e.code,{children:"buildConfig"})," \u662F\u7528\u4E8E\u4FEE\u6539\u4EA7\u7269\u7684\u65B9\u5F0F\u4E4B\u4E00\uFF0C",n(e.strong,{children:["\u5F53\u4E0E ",o(e.code,{children:"buildPreset"})," \u914D\u7F6E\u540C\u65F6\u5B58\u5728\u7684\u65F6\u5019\uFF0C\u53EA\u6709 ",o(e.code,{children:"buildConfig"})," \u624D\u4F1A\u751F\u6548"]}),"\u3002\u56E0\u6B64\u5982\u679C\u6309\u7167\u5982\u4E0B\u65B9\u5F0F\u914D\u7F6E\uFF1A"]}),`
|
|
96
|
+
`,o(r.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"@modern-js/module-tools",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"defineConfig",props:{style:{color:"#88C0D0"}}},{content:"(",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildConfig",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" [",props:{style:{color:"#D8DEE9FF"}}},{content:"{}",props:{style:{color:"#ECEFF4"}}},{content:"]",props:{style:{color:"#D8DEE9FF"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"buildPreset",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"base-config",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:")",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"typescript"},annotations:[]}]}),`
|
|
97
|
+
`,o(e.p,{children:"\u90A3\u4E48\u6B64\u65F6\u5C31\u4F1A\u770B\u5230\u5982\u4E0B\u63D0\u793A\uFF1A"}),`
|
|
98
|
+
`,o(r.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"\u56E0\u4E3A\u540C\u65F6\u51FA\u73B0 ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"buildConfig",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:" \u548C ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"buildPreset",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:" \u914D\u7F6E\uFF0C\u56E0\u6B64\u4EC5 ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"buildConfig",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:" \u914D\u7F6E\u751F\u6548",props:{style:{color:"#D8DEE9FF"}}}]}],lang:"bash"},annotations:[]}]}),`
|
|
99
|
+
`,n(e.p,{children:[o(e.code,{children:"buildPreset"})," \u4EE3\u8868\u7684\u4E00\u7EC4\u6216\u8005\u591A\u7EC4\u6784\u5EFA\u76F8\u5173\u7684\u914D\u7F6E\u90FD\u662F\u7531 ",o(e.code,{children:"buildConfig"})," \u7EC4\u6210\uFF0C",n(e.strong,{children:["\u5F53\u4F7F\u7528 ",o(e.code,{children:"buildPreset"})," \u65E0\u6CD5\u6EE1\u8DB3\u5F53\u524D\u9879\u76EE\u9700\u6C42\u7684\u65F6\u5019\uFF0C\u5C31\u53EF\u4EE5\u4F7F\u7528 ",o(e.code,{children:"buildConfig"})," \u6765\u81EA\u5B9A\u4E49\u8F93\u51FA\u4EA7\u7269"]}),"\u3002"]}),`
|
|
100
|
+
`,n(e.p,{children:["\u5728\u4F7F\u7528 ",o(e.code,{children:"buildConfig"})," \u7684\u8FC7\u7A0B\uFF0C\u5C31\u662F\u5BF9\u201C",o(e.em,{children:"\u83B7\u5F97\u600E\u6837\u7684\u6784\u5EFA\u4EA7\u7269"}),"\u201D\u7684\u601D\u8003\u8FC7\u7A0B\u3002"]})]})}function y(t={}){const{wrapper:e}=t.components||{};return e?o(e,Object.assign({},t,{children:o(c,t)})):c(t)}function a(t,e){throw new Error("Expected "+(e?"component":"object")+" `"+t+"` to be defined: you likely forgot to import, pass, or provide it.")}const C="2022/12/1 20:09:37",E='# \u4FEE\u6539\u8F93\u51FA\u4EA7\u7269\n\n## \u9ED8\u8BA4\u8F93\u51FA\u4EA7\u7269\n\n\u5F53\u5728\u521D\u59CB\u5316\u7684\u9879\u76EE\u91CC\u4F7F\u7528 `modern build` \u547D\u4EE4\u7684\u65F6\u5019\uFF0C\u4F1A\u6839\u636E Module Tools \u9ED8\u8BA4\u652F\u6301\u7684\u914D\u7F6E\u751F\u6210\u76F8\u5E94\u7684\u4EA7\u7269\u3002\u9ED8\u8BA4\u652F\u6301\u7684\u914D\u7F6E\u5177\u4F53\u5982\u4E0B\uFF1A\n\n``` typescript\nimport { defineConfig } from \'@modern-js/module-tools\';\n\nexport default defineConfig({\n buildPreset: \'base-config\',\n});\n```\n\n**\u9ED8\u8BA4\u751F\u6210\u4EA7\u7269\u5177\u6709\u4EE5\u4E0B\u7279\u70B9**\uFF1A\n\n- \u4EE3\u7801\u683C\u5F0F\u4E3A [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules)\uFF0C\u6216\u8005\u7B80\u79F0\u4E3A `cjs`\u3002\n- \u4EE3\u7801\u8BED\u6CD5\u652F\u6301\u5230 `ES6`\u3002\n- \u6240\u6709\u7684\u4EE3\u7801\u7ECF\u8FC7\u6253\u5305\u53D8\u6210\u4E86\u4E00\u4E2A\u6587\u4EF6\uFF0C\u5373\u8FDB\u884C\u4E86 **bundle** \u5904\u7406\u3002\n- \u4EA7\u7269\u8F93\u51FA\u6839\u76EE\u5F55\u4E3A\u9879\u76EE\u4E0B\u7684 `dist` \u76EE\u5F55\uFF0C\u7C7B\u578B\u6587\u4EF6\u8F93\u51FA\u7684\u76EE\u5F55\u4E3A `dist/types`\u3002\n\n:::tip\n1. \u6240\u8C13\u201C\u4EE3\u7801\u8BED\u6CD5\u652F\u6301\u5230 ES6\u201D\u7684\u610F\u601D\u662F\u6307\uFF1A\u4EA7\u7269\u4EE3\u7801\u6240\u652F\u6301\u7684\u8BED\u6CD5\u4E0D\u4F1A\u8D85\u8FC7 `ES6`\u3002\u5982\u679C\u6E90\u7801\u4E2D\u4F7F\u7528\u8BED\u6CD5\u662F `ES6` \u4EE5\u4E0A\u7684\u8BED\u6CD5\uFF08\u4F8B\u5982 `ES2017`\uFF09\uFF0C\u5219\u4F1A\u88AB\u8FDB\u884C\u8F6C\u6362\u3002\n:::\n\n\u770B\u5230\u8FD9\u91CC\u4F60\u53EF\u80FD\u4F1A\u6709\u4EE5\u4E0B\u7591\u95EE\uFF1A\n\n1. `buildPreset` \u662F\u4EC0\u4E48\uFF1F\n2. \u4EA7\u7269\u7684\u8FD9\u4E9B\u7279\u70B9\u662F\u7531\u4EC0\u4E48\u51B3\u5B9A\u7684\uFF1F\n\n\u90A3\u4E48\u63A5\u4E0B\u6765\u9996\u5148\u89E3\u91CA\u4E00\u4E0B `buildPreset`\u3002\n\n## \u6784\u5EFA\u9884\u8BBE\n\n`buildPreset` \u4EE3\u8868\u7740\u63D0\u524D\u51C6\u5907\u597D\u7684\u4E00\u7EC4\u6216\u8005\u591A\u7EC4\u6784\u5EFA\u76F8\u5173\u7684\u914D\u7F6E\uFF0C\u53EA\u9700\u8981\u4F7F\u7528 `buildPreset` \u5BF9\u5E94\u7684\u9884\u8BBE\u503C\uFF0C\u5C31\u53EF\u4EE5\u7701\u53BB\u9EBB\u70E6\u4E14\u590D\u6742\u7684\u914D\u7F6E\u5DE5\u4F5C\uFF0C\u5F97\u5230\u7B26\u5408\u9884\u671F\u7684\u4EA7\u7269\u3002\n\n### \u6784\u5EFA\u9884\u8BBE\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\n\n**\u6784\u5EFA\u9884\u8BBE\u7684\u503C\u53EF\u4EE5\u662F\u5B57\u7B26\u4E32\u5F62\u5F0F**\uFF0C\u56E0\u6B64\u8FD9\u6837\u5F62\u5F0F\u7684\u6784\u5EFA\u9884\u8BBE\u53EB\u505A\u9884\u8BBE\u5B57\u7B26\u4E32\u3002\n\n\u6A21\u5757\u5DE5\u7A0B\u89E3\u51B3\u65B9\u6848\u6839\u636E npm \u5305\u4F7F\u7528\u7684\u901A\u7528\u573A\u666F\uFF0C\u63D0\u4F9B\u4E86\u901A\u7528\u7684\u6784\u5EFA\u9884\u8BBE\u5B57\u7B26\u4E32\u4EE5\u53CA\u76F8\u5E94\u7684\u53D8\u4F53\u3002\u76EE\u524D\u652F\u6301\u7684\u6240\u6709\u9884\u8BBE\u5B57\u7B26\u4E32\u53EF\u4EE5\u901A\u8FC7 [BuildPreset API](/zh/api/build-config) \u67E5\u770B\u3002\u8FD9\u91CC\u8BB2\u89E3\u4E00\u4E0B\u5173\u4E8E**\u901A\u7528\u7684\u9884\u8BBE\u5B57\u7B26\u4E32\u4E0E\u53D8\u4F53\u4E4B\u95F4\u7684\u5173\u7CFB**\u3002\n\n\u5728\u901A\u7528\u7684\u9884\u8BBE\u5B57\u7B26\u4E32\u4E2D\uFF0C`"npm-library"` \u53EF\u4EE5\u7528\u4E8E\u5728\u5F00\u53D1\u5E93\u7C7B\u578B\u7684 npm \u5305\u7684\u573A\u666F\u4E0B\u4F7F\u7528\uFF0C\u5B83\u9002\u5408\u5927\u591A\u6570\u666E\u901A\u7684\u6A21\u5757\u7C7B\u578B\u9879\u76EE\u3002\u5F53\u8BBE\u7F6E `"npm-library"` \u7684\u65F6\u5019\uFF0C\u9879\u76EE\u7684\u8F93\u51FA\u4EA7\u7269\u4F1A\u6709\u4EE5\u4E0B\u7279\u70B9\uFF1A\n\n- \u5728 `dist/lib` \u76EE\u5F55\u4E0B\u4F1A\u5F97\u5230\u4EE3\u7801\u683C\u5F0F\u4E3A `cjs`\u3001\u8BED\u6CD5\u652F\u6301\u5230 `es6` \u4E14\u7ECF\u8FC7\u6253\u5305\u5904\u7406\u540E\u7684\u4EA7\u7269\u3002\n- \u5728 `dist/es` \u76EE\u5F55\u4E0B\u4F1A\u5F97\u5230\u4EE3\u7801\u683C\u5F0F\u4E3A `esm`\u3001\u8BED\u6CD5\u652F\u6301\u4E3A `es6` \u4E14\u7ECF\u8FC7\u6253\u5305\u5904\u7406\u540E\u7684\u4EA7\u7269\u3002\n- \u5728 `dist/types` \u76EE\u5F55\u4E0B\u4F1A\u5F97\u5230\u7C7B\u578B\u6587\u4EF6\u3002\u5982\u679C\u4E0D\u662F TypeScript \u9879\u76EE\uFF0C\u5219\u6CA1\u6709\u8BE5\u76EE\u5F55\u3002\n\n\u800C\u9884\u8BBE\u5B57\u7B26\u4E32 `"npm-library"` \u5BF9\u5E94\u7684\u53D8\u4F53\u5219\u662F\u5728\u539F\u672C\u4EA7\u7269\u7684\u57FA\u7840\u4E0A\u4FEE\u6539\u4E86**\u4EE3\u7801\u8BED\u6CD5\u652F\u6301**\u8FD9\u4E00\u7279\u70B9\uFF0C\u540C\u65F6\u5728\u5B57\u7B26\u4E32\u547D\u540D\u4E0A\u4E5F\u53D8\u4E3A\u4E86 `"npm-library-[es5 | es2016...es2020 | esnext]"` \u8FD9\u6837\u7684\u5F62\u5F0F\u3002\n\n\u4F8B\u5982\uFF0C\u5982\u679C\u5728\u9884\u8BBE\u5B57\u7B26\u4E32 `"npm-library"` \u5BF9\u5E94\u7684\u8F93\u51FA\u4EA7\u7269\u57FA\u7840\u4E0A\uFF0C\u8BA9\u4EA7\u7269\u4EE3\u7801\u652F\u6301\u7684\u8BED\u6CD5\u53D8\u4E3A `es2017` \u7684\u8BDD\uFF0C\u90A3\u4E48\u53EA\u9700\u8981\u5C06 `"npm-library"` \u6539\u53D8\u4E3A `"npm-library-es2017"` \u5C31\u53EF\u4EE5\u4E86\u3002\n\n### \u6784\u5EFA\u9884\u8BBE\u7684\u51FD\u6570\u5F62\u5F0F\n\n**\u9664\u4E86\u5B57\u7B26\u4E32\u5F62\u5F0F\u4EE5\u5916\uFF0C\u6784\u5EFA\u9884\u8BBE\u7684\u503C\u4E5F\u53EF\u4EE5\u662F\u51FD\u6570\u5F62\u5F0F\uFF0C\u5728\u51FD\u6570\u4E2D\u53EF\u4EE5\u6253\u5370\u6216\u8005\u4FEE\u6539\u67D0\u4E2A\u9884\u8BBE\u503C\u5BF9\u5E94\u7684\u5177\u4F53\u914D\u7F6E**\u3002\n\n\u4F8B\u5982\uFF0C\u5982\u679C\u4F7F\u7528\u9884\u8BBE\u51FD\u6570\u7684\u5F62\u5F0F\u8FBE\u5230\u9884\u8BBE\u5B57\u7B26\u4E32 `"npm-library-es2017"` \u540C\u6837\u7684\u6548\u679C\uFF0C\u53EF\u4EE5\u6309\u7167\u5982\u4E0B\u7684\u65B9\u5F0F\uFF1A\n\n``` typescript\nimport { defineConfig } from "@modern-js/module-tools";\n\nexport default defineConfig({\n buildPreset({ preset }) {\n return preset.NPM_LIBRARY.map(config => {\n return { ...config, target: \'es2017\' };\n });\n },\n});\n```\n\n\u5728\u4E0A\u9762\u7684\u4EE3\u7801\u5B9E\u73B0\u4E2D\uFF0C`preset.NPM_LIBRARY` \u4E0E\u9884\u8BBE\u5B57\u7B26\u4E32 `"npm-library"` \u662F\u76F8\u5BF9\u5E94\u7684\uFF0C\u5B83\u4EE3\u8868\u7740 `"npm-library"` \u7B49\u4EF7\u7684\u591A\u7EC4\u6784\u5EFA\u76F8\u5173\u7684\u914D\u7F6E\u3002\u6211\u4EEC\u901A\u8FC7 `map` \u65B9\u6CD5\u904D\u5386\u4E86 `NPM_LIBRARY` \u8FD9\u4E2A\u6570\u7EC4\uFF0C\u5728\u8FD9\u4E2A\u6570\u7EC4\u4E2D\u5305\u542B\u4E86\u591A\u4E2A `buildConfig` \u5BF9\u8C61\u3002\u6211\u4EEC\u5C06\u539F\u672C\u7684 `buildConfig` \u5BF9\u8C61\u8FDB\u884C\u4E86\u6D45\u62F7\u8D1D\u5E76\u4FEE\u6539\u4E86\u6D45\u62F7\u8D1D\u540E\u5F97\u5230 `buildConfig.target`\uFF0C\u5C06\u5B83\u6307\u5B9A\u4E3A `es2017`\u3002\n> \u5173\u4E8E `preset.NPM_LIBRARY` \u5177\u4F53\u5BF9\u5E94\u7684\u503C\uFF0C\u53EF\u4EE5\u901A\u8FC7 [BuildPreset API](/zh/api/build-config) \u67E5\u770B\u3002\u5728 `preset` \u5BF9\u8C61\u4E0B\u4E0D\u4EC5\u5305\u542B\u4E86 `NPM_LIBRARY`\uFF0C\u8FD8\u5305\u542B\u4E86\u5176\u4ED6\u7C7B\u4F3C\u7684\u5E38\u91CF\u3002\n\n\u90A3\u4E48\u8FD9\u91CC\u7684 `buildConfig` \u5BF9\u8C61\u662F\u4EC0\u4E48\u5462\uFF1F\u4E4B\u524D\u63D0\u5230\u7684\u6784\u5EFA\u4EA7\u7269\u7279\u70B9\u53C8\u662F\u6839\u636E\u4EC0\u4E48\u5462\uFF1F\n\n\u63A5\u4E0B\u6765\u6211\u4EEC\u89E3\u91CA\u4E00\u4E0B\u3002\n\n## \u6784\u5EFA\u914D\u7F6E\uFF08\u5BF9\u8C61\uFF09\n\n**`buildConfig` \u662F\u4E00\u4E2A\u7528\u6765\u63CF\u8FF0\u5982\u4F55\u7F16\u8BD1\u3001\u751F\u6210\u6784\u5EFA\u4EA7\u7269\u7684\u914D\u7F6E\u5BF9\u8C61**\u3002\u5728\u6700\u5F00\u59CB\u63D0\u5230\u7684\u5173\u4E8E\u201C*\u6784\u5EFA\u4EA7\u7269\u7684\u7279\u70B9*\u201D\uFF0C\u5176\u5B9E\u90FD\u662F `buildConfig` \u6240\u652F\u6301\u7684\u5C5E\u6027\u3002\u76EE\u524D\u6240\u652F\u6301\u7684\u5C5E\u6027\u8986\u76D6\u4E86\u5927\u90E8\u5206\u6A21\u5757\u7C7B\u578B\u9879\u76EE\u5728\u6784\u5EFA\u4EA7\u7269\u65F6\u7684\u9700\u6C42\uFF0C`buildConfig` \u4E0D\u4EC5\u5305\u542B\u4E00\u4E9B\u4EA7\u7269\u6240\u5177\u5907\u7684\u5C5E\u6027\uFF0C\u4E5F\u5305\u542B\u4E86\u6784\u5EFA\u4EA7\u7269\u6240\u9700\u8981\u7684\u4E00\u4E9B\u7279\u6027\u529F\u80FD\u3002\u63A5\u4E0B\u6765\u4ECE\u5206\u7C7B\u7684\u89D2\u5EA6\u7B80\u5355\u7F57\u5217\u4E00\u4E0B\uFF1A\n\n**\u6784\u5EFA\u4EA7\u7269\u7684\u57FA\u672C\u5C5E\u6027\u5305\u62EC\uFF1A**\n\n- \u4EA7\u7269\u662F\u5426\u88AB\u6253\u5305\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.buildType`](/zh/api/build-config#buildtype)\u3002\n- \u4EA7\u7269\u5BF9\u4E8E\u8BED\u6CD5\u7684\u652F\u6301\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.target`](/zh/api/build-config#target)\u3002\n- \u4EA7\u7269\u683C\u5F0F\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.format`](/zh/api/build-config#format)\u3002\n- \u4EA7\u7269\u7C7B\u578B\u6587\u4EF6\u5982\u4F55\u5904\u7406\uFF0C\u5BF9\u5E94\u7684 API \u662F [`buildConfig.dts`](/zh/api/build-config#dts)\u3002\n- \u4EA7\u7269\u7684 sourceMap \u5982\u4F55\u5904\u7406\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.sourceMap`](/zh/api/build-config#sourcemap)\u3002\n- \u4EA7\u7269\u5BF9\u5E94\u7684\u8F93\u5165\uFF08\u6216\u8005\u662F\u6E90\u6587\u4EF6\uFF09\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.input`](/zh/api/build-config#input)\u3002\n- \u4EA7\u7269\u8F93\u51FA\u7684\u76EE\u5F55\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.outdir`](/zh/api/build-config#outdir)\u3002\n- \u6784\u5EFA\u7684\u6E90\u7801\u76EE\u5F55\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.sourceDir`](/zh/api/build-config#sourcedir)\u3002\n\n**\u6784\u5EFA\u4EA7\u7269\u6240\u9700\u7684\u5E38\u7528\u529F\u80FD\u5305\u62EC\uFF1A**\n\n- \u522B\u540D\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.alias`](/zh/api/build-config#alias)\u3002\n- \u9759\u6001\u8D44\u6E90\u5904\u7406\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.asset`](/zh/api/build-config#asset)\u3002\n- \u7B2C\u4E09\u65B9\u4F9D\u8D56\u5904\u7406\uFF1A\u5BF9\u5E94\u7684 API \u6709\uFF1A\n * [`buildConfig.autoExternal`](/zh/api/build-config#autoexternal)\u3002\n * [`buildConfig.externals`](/zh/api/build-config#externals)\u3002\n- \u62F7\u8D1D\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.copy`](/zh/api/build-config#copy)\u3002\n- \u5168\u5C40\u53D8\u91CF\u66FF\u6362\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.define`](/zh/api/build-config#define)\u3002\n- \u6307\u5B9A [JSX](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) \u7F16\u8BD1\u65B9\u5F0F\uFF0C\u5BF9\u5E94\u7684 API \u662F [`buildConfig.jsx`](/zh/api/build-config#jsx)\u3002\n\n**\u4E00\u4E9B\u9AD8\u7EA7\u5C5E\u6027\u6216\u8005\u4F7F\u7528\u9891\u7387\u4E0D\u9AD8\u7684\u529F\u80FD\uFF1A**\n\n- \u4EA7\u7269\u4EE3\u7801\u538B\u7F29\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.minify`](/zh/api/build-config#minify)\u3002\n- \u4EE3\u7801\u5206\u5272\uFF1A[`buildConfig.spitting`](/zh/api/build-config#splitting)\n- \u6307\u5B9A\u6784\u5EFA\u4EA7\u7269\u7528\u4E8E NodeJS \u73AF\u5883\u8FD8\u662F\u6D4F\u89C8\u5668\u73AF\u5883\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.platform`](/zh/api/build-config#platform)\u3002\n- umd \u4EA7\u7269\u76F8\u5173\uFF1A\n * \u6307\u5B9A umd \u4EA7\u7269\u5916\u90E8\u5BFC\u5165\u7684\u5168\u5C40\u53D8\u91CF\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.umdGlobals`](/zh/api/build-config#umdglobals)\u3002\n * \u6307\u5B9A umd \u4EA7\u7269\u7684\u6A21\u5757\u540D\uFF1A\u5BF9\u5E94\u7684 API \u662F [`buildConfig.umdModuleName`](/zh/api/build-config#umdmodulename)\u3002\n\n\u9664\u4E86\u4EE5\u4E0A\u5206\u7C7B\u4EE5\u5916\uFF0C\u5173\u4E8E\u8FD9\u4E9B API \u7684\u5E38\u89C1\u95EE\u9898\u548C\u6700\u4F73\u5B9E\u8DF5\u53EF\u4EE5\u901A\u8FC7\u4E0B\u9762\u7684\u94FE\u63A5\u6765\u4E86\u89E3\uFF1A\n\n* \u4EC0\u4E48\u662F `bundle` \u548C `bundleless`?\n* `input` \u4E0E `sourceDir` \u7684\u5173\u7CFB\u3002\n* \u4EA7\u7269\u4E2D\u7C7B\u578B\u6587\u4EF6\u7684\u591A\u79CD\u751F\u6210\u65B9\u5F0F\u3002\n* `buildConfig.define` \u4E0D\u540C\u573A\u666F\u7684\u4F7F\u7528\u65B9\u5F0F\u3002\n* \u5982\u4F55\u5904\u7406\u7B2C\u4E09\u65B9\u4F9D\u8D56\uFF1F\n* \u5982\u4F55\u4F7F\u7528\u62F7\u8D1D\uFF1F\n* \u5982\u4F55\u6784\u5EFA umd \u4EA7\u7269\uFF1F\n* \u9759\u6001\u8D44\u6E90\u76EE\u524D\u6240\u652F\u6301\u7684\u80FD\u529B\u3002\n\n## \u4EC0\u4E48\u65F6\u5019\u4F7F\u7528 `buildConfig`\n\n`buildConfig` \u662F\u7528\u4E8E\u4FEE\u6539\u4EA7\u7269\u7684\u65B9\u5F0F\u4E4B\u4E00\uFF0C**\u5F53\u4E0E `buildPreset` \u914D\u7F6E\u540C\u65F6\u5B58\u5728\u7684\u65F6\u5019\uFF0C\u53EA\u6709 `buildConfig` \u624D\u4F1A\u751F\u6548**\u3002\u56E0\u6B64\u5982\u679C\u6309\u7167\u5982\u4E0B\u65B9\u5F0F\u914D\u7F6E\uFF1A\n\n``` typescript\nimport { defineConfig } from \'@modern-js/module-tools\';\n\nexport default defineConfig({\n buildConfig: [{}],\n buildPreset: \'base-config\',\n});\n```\n\n\u90A3\u4E48\u6B64\u65F6\u5C31\u4F1A\u770B\u5230\u5982\u4E0B\u63D0\u793A\uFF1A\n\n``` bash\n\u56E0\u4E3A\u540C\u65F6\u51FA\u73B0 \'buildConfig\' \u548C \'buildPreset\' \u914D\u7F6E\uFF0C\u56E0\u6B64\u4EC5 \'buildConfig\' \u914D\u7F6E\u751F\u6548\n```\n\n`buildPreset` \u4EE3\u8868\u7684\u4E00\u7EC4\u6216\u8005\u591A\u7EC4\u6784\u5EFA\u76F8\u5173\u7684\u914D\u7F6E\u90FD\u662F\u7531 `buildConfig` \u7EC4\u6210\uFF0C**\u5F53\u4F7F\u7528 `buildPreset` \u65E0\u6CD5\u6EE1\u8DB3\u5F53\u524D\u9879\u76EE\u9700\u6C42\u7684\u65F6\u5019\uFF0C\u5C31\u53EF\u4EE5\u4F7F\u7528 `buildConfig` \u6765\u81EA\u5B9A\u4E49\u8F93\u51FA\u4EA7\u7269**\u3002\n\n\u5728\u4F7F\u7528 `buildConfig` \u7684\u8FC7\u7A0B\uFF0C\u5C31\u662F\u5BF9\u201C*\u83B7\u5F97\u600E\u6837\u7684\u6784\u5EFA\u4EA7\u7269*\u201D\u7684\u601D\u8003\u8FC7\u7A0B\u3002\n';export{r as CH,i as chCodeConfig,E as content,y as default,f as frontmatter,C as lastUpdatedTime,b as title,h as toc};
|