import{M as ee,_ as e,c as t,d as n,g as r,h as i,q as a,z as te}from"./chunks/runtime-core.esm-bundler.Di_optew.js";import{t as ne}from"./chunks/plugin-vue_export-helper.B_ZXV7eh.js";var o=JSON.parse(`{"title":"JavaScript API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/api-javascript.md","filePath":"guide/api-javascript.md"}`),s={name:`guide/api-javascript.md`},c={class:`language-ts`},l={class:`shiki shiki-themes github-light github-dark twoslash lsp`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`,dir:`ltr`},u={class:`line`},d={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},f={class:`line`},p={style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},m={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},h={class:`line`},g={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},_={class:`line`},v={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},y={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},b={class:`line`},x={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},S={class:`line`},C={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},w={class:`line`},T={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},E={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},D={class:`line`},O={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},k={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},A={class:`line`},j={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},M={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},N={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},P={class:`tip custom-block`},F={class:`language-ts`},I={class:`shiki shiki-themes github-light github-dark twoslash lsp`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`,dir:`ltr`},L={class:`line`},R={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},z={class:`line`},B={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},V={class:`line`},H={style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},U={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},W={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},G={class:`line`},K={style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},q={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},J={class:`line`},Y={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},X={class:`line`},Z={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},re={class:`line`},ie={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},ae={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},oe={class:`line`},se={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},ce={class:`line`},le={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},ue={class:`line`},de={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Q={class:`line`},fe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},pe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},me={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},he={class:`vp-code-block-title`},ge={class:`language-ts`},_e={class:`shiki shiki-themes github-light github-dark twoslash lsp`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`,dir:`ltr`},ve={class:`line`},ye={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},be={class:`line`},xe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Se={class:`line`},Ce={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},we={class:`line`},Te={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Ee={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},De={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},Oe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},ke={class:`line`},Ae={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},je={class:`line`},Me={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Ne={class:`line`},Pe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Fe={class:`language-ts`},Ie={class:`shiki shiki-themes github-light github-dark twoslash lsp`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`,dir:`ltr`},Le={class:`line`},Re={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},ze={class:`line`},Be={style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},Ve={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},He={class:`line`},Ue={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},We={class:`line`},Ge={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Ke={class:`line`},qe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Je={class:`line`},Ye={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},Xe={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},Ze={class:`line`},Qe={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},$e={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},et={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},tt={class:`tip custom-block`},nt={class:`language-ts`},rt={class:`shiki shiki-themes github-light github-dark twoslash lsp`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`,dir:`ltr`},it={class:`line`},at={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},ot={style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},st={class:`line`},ct={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},lt={style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},ut={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},dt={style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}};function ft(ne,o,s,ft,pt,mt){let $=te(`v-menu`);return ee(),n(`div`,null,[o[346]||=i("",7),t(`div`,c,[o[83]||=t(`button`,{title:`Copy Code`,class:`copy`},null,-1),o[84]||=t(`span`,{class:`lang`},`ts`,-1),t(`pre`,l,[t(`code`,null,[t(`span`,u,[o[2]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`,-1),o[3]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` { `,-1),t(`span`,d,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[0]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` |`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ResolvedConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`ViteDevServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)])],-1)]]),default:a(()=>[o[1]||=t(`span`,null,`createServer`,-1)]),_:1})]),o[4]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` } `,-1),o[5]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`,-1),o[6]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'vite'`,-1)]),o[65]||=r(` `,-1),o[66]||=t(`span`,{class:`line`},null,-1),o[67]||=r(` `,-1),t(`span`,f,[o[11]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`,-1),o[12]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` `,-1),t(`span`,p,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[7]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ViteDevServer`)])],-1)]]),default:a(()=>[o[8]||=t(`span`,null,`server`,-1)]),_:1})]),o[13]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` =`,-1),o[14]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` await`,-1),o[15]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` `,-1),t(`span`,m,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[9]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` |`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ResolvedConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`ViteDevServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)])],-1)]]),default:a(()=>[o[10]||=t(`span`,null,`createServer`,-1)]),_:1})]),o[16]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({`,-1)]),o[68]||=r(` `,-1),o[69]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}}," // any valid user config options, plus `mode` and `configFile`")],-1),o[70]||=r(` `,-1),t(`span`,h,[o[19]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,g,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[17]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`configFile`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`false`)])],-1)]]),default:a(()=>[o[18]||=t(`span`,null,`configFile`,-1)]),_:1})]),o[20]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[21]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`false`,-1),o[22]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[71]||=r(` `,-1),t(`span`,_,[o[27]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,v,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[23]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`root`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: string`)])],-1)]]),default:a(()=>[o[24]||=t(`span`,null,`root`,-1)]),_:1})]),o[28]||=i("",5),t(`span`,y,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[25]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ImportMeta.dirname: string`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`The directory name of the current module.`),r(` `),t(`p`,null,[r(`This is the same as the `),t(`code`,null,`path.dirname()`),r(` of the `),t(`code`,null,`import.meta.filename`),r(`.`)]),r(` `),t(`blockquote`,null,[r(` `),t(`p`,null,[t(`strong`,null,`Caveat`),r(`: only present on `),t(`code`,null,`file:`),r(` modules.`)]),r(` `)])]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@since`),t(`span`,{class:`twoslash-popup-docs-tag-value`},`v21.2.0, v20.11.0`)])])],-1)]]),default:a(()=>[o[26]||=t(`span`,null,`dirname`,-1)]),_:1})]),o[29]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[72]||=r(` `,-1),t(`span`,b,[o[32]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,x,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[30]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` port`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: number;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`}`)])])])])],-1)]]),default:a(()=>[o[31]||=t(`span`,null,`server`,-1)]),_:1})]),o[33]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[73]||=r(` `,-1),t(`span`,S,[o[36]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,C,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[34]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`port`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: number`)])],-1)]]),default:a(()=>[o[35]||=t(`span`,null,`port`,-1)]),_:1})]),o[37]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[38]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`1337`,-1),o[39]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[74]||=r(` `,-1),o[75]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` },`)],-1),o[76]||=r(` `,-1),o[77]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`})`)],-1),o[78]||=r(` `,-1),t(`span`,w,[o[44]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`await`,-1),o[45]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,T,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[40]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ViteDevServer`)])],-1)]]),default:a(()=>[o[41]||=t(`span`,null,`server`,-1)]),_:1})]),o[46]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,E,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[42]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ViteDevServer.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`listen`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(port`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` number, isRestart`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` boolean): `),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`Promise`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`<`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ViteDevServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`>`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Start the server.`)])],-1)]]),default:a(()=>[o[43]||=t(`span`,null,`listen`,-1)]),_:1})]),o[47]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`()`,-1)]),o[79]||=r(` `,-1),o[80]||=t(`span`,{class:`line`},null,-1),o[81]||=r(` `,-1),t(`span`,D,[t(`span`,O,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[48]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ViteDevServer`)])],-1)]]),default:a(()=>[o[49]||=t(`span`,null,`server`,-1)]),_:1})]),o[52]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,k,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[50]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ViteDevServer.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`printUrls`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(): `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`void`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Print server urls`)])],-1)]]),default:a(()=>[o[51]||=t(`span`,null,`printUrls`,-1)]),_:1})]),o[53]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`()`,-1)]),o[82]||=r(` `,-1),t(`span`,A,[t(`span`,j,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[54]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ViteDevServer`)])],-1)]]),default:a(()=>[o[55]||=t(`span`,null,`server`,-1)]),_:1})]),o[60]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,M,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[56]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ViteDevServer.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`bindCLIShortcuts`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(options`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` BindCLIShortcutsOptions`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`<`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ViteDevServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`>`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`): `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`void`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Bind CLI shortcuts`)])],-1)]]),default:a(()=>[o[57]||=t(`span`,null,`bindCLIShortcuts`,-1)]),_:1})]),o[61]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({ `,-1),t(`span`,N,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[58]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`print`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` boolean `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Print a one-line shortcuts "help" hint to the terminal`)])],-1)]]),default:a(()=>[o[59]||=t(`span`,null,`print`,-1)]),_:1})]),o[62]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[63]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`true`,-1),o[64]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` })`,-1)])])])]),o[347]||=i("",1),t(`div`,P,[o[191]||=t(`p`,{class:`custom-block-title`},`NOTE`,-1),o[192]||=t(`p`,null,[r(`When using `),t(`a`,{href:`/config/server-options.html#server-middlewaremode`},`middleware mode`),r(` combined with `),t(`a`,{href:`/config/server-options.html#server-proxy`},`proxy config for WebSocket`),r(`, the parent http server should be provided in `),t(`code`,null,`middlewareMode`),r(` to bind the proxy correctly.`)],-1),t(`details`,null,[o[190]||=t(`summary`,null,`Example`,-1),t(`div`,F,[o[188]||=t(`button`,{title:`Copy Code`,class:`copy`},null,-1),o[189]||=t(`span`,{class:`lang`},`ts`,-1),t(`pre`,I,[t(`code`,null,[t(`span`,L,[o[87]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`,-1),o[88]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,R,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[85]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`module`),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` "http"`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,[r(`To use the HTTP server and client one must import the `),t(`code`,null,`node:http`),r(` module.`)]),r(` `),t(`p`,null,`The HTTP interfaces in Node.js are designed to support many features of the protocol which have been traditionally difficult to use. In particular, large, possibly chunk-encoded, messages. The interface is careful to never buffer entire requests or responses, so the user is able to stream data.`),r(` `),t(`p`,null,`HTTP message headers are represented by an object like this:`),r(` `),t(`code`,null,[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`{ `),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`"content-length"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"123"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "content-type"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"text/plain"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "connection"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"keep-alive"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "host"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"example.com"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "accept"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"*"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` }`)])])])]),r(` `),t(`p`,null,`Keys are lowercased. Values are not modified.`),r(` `),t(`p`,null,`In order to support the full spectrum of possible HTTP applications, the Node.js HTTP API is very low-level. It deals with stream handling and message parsing only. It parses a message into headers and body but it does not parse the actual headers or the body.`),r(` `),t(`p`,null,[r(`See `),t(`code`,null,`message.headers`),r(` for details on how duplicate headers are handled.`)]),r(` `),t(`p`,null,[r(`The raw headers as they were received are retained in the `),t(`code`,null,`rawHeaders`),r(` property, which is an array of `),t(`code`,null,`[key, value, key2, value2, ...]`),r(`. For example, the previous message header object might have a `),t(`code`,null,`rawHeaders`),r(` list like the following:`)]),r(` `),t(`code`,null,[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`[ `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'ConTent-Length'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'123456'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'content-LENGTH'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'123'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'content-type'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'text/plain'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'CONNECTION'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'keep-alive'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'Host'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'example.com'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'accepT'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'*'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` ]`)])])])])]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@see`),t(`span`,{class:`twoslash-popup-docs-tag-value`},[t(`a`,{href:`https://github.com/nodejs/node/blob/v24.x/lib/http.js`},`source`)])])])],-1)]]),default:a(()=>[o[86]||=t(`span`,null,`http`,-1)]),_:1})]),o[89]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),o[90]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`,-1),o[91]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'http'`,-1)]),o[164]||=r(` `,-1),t(`span`,z,[o[94]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`,-1),o[95]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` { `,-1),t(`span`,B,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[92]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` |`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ResolvedConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`ViteDevServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)])],-1)]]),default:a(()=>[o[93]||=t(`span`,null,`createServer`,-1)]),_:1})]),o[96]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` } `,-1),o[97]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`,-1),o[98]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'vite'`,-1)]),o[165]||=r(` `,-1),o[166]||=t(`span`,{class:`line`},null,-1),o[167]||=r(` `,-1),t(`span`,V,[o[105]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`,-1),o[106]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` `,-1),t(`span`,H,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[99]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` parentServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` http`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`Server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.IncomingMessage, `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.ServerResponse>`)])],-1)]]),default:a(()=>[o[100]||=t(`span`,null,`parentServer`,-1)]),_:1})]),o[107]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` =`,-1),o[108]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,U,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[101]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`module`),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` "http"`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,[r(`To use the HTTP server and client one must import the `),t(`code`,null,`node:http`),r(` module.`)]),r(` `),t(`p`,null,`The HTTP interfaces in Node.js are designed to support many features of the protocol which have been traditionally difficult to use. In particular, large, possibly chunk-encoded, messages. The interface is careful to never buffer entire requests or responses, so the user is able to stream data.`),r(` `),t(`p`,null,`HTTP message headers are represented by an object like this:`),r(` `),t(`code`,null,[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`{ `),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`"content-length"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"123"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "content-type"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"text/plain"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "connection"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"keep-alive"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "host"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"example.com"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` "accept"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`"*"`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` }`)])])])]),r(` `),t(`p`,null,`Keys are lowercased. Values are not modified.`),r(` `),t(`p`,null,`In order to support the full spectrum of possible HTTP applications, the Node.js HTTP API is very low-level. It deals with stream handling and message parsing only. It parses a message into headers and body but it does not parse the actual headers or the body.`),r(` `),t(`p`,null,[r(`See `),t(`code`,null,`message.headers`),r(` for details on how duplicate headers are handled.`)]),r(` `),t(`p`,null,[r(`The raw headers as they were received are retained in the `),t(`code`,null,`rawHeaders`),r(` property, which is an array of `),t(`code`,null,`[key, value, key2, value2, ...]`),r(`. For example, the previous message header object might have a `),t(`code`,null,`rawHeaders`),r(` list like the following:`)]),r(` `),t(`code`,null,[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`[ `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'ConTent-Length'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'123456'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'content-LENGTH'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'123'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'content-type'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'text/plain'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'CONNECTION'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'keep-alive'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'Host'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'example.com'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'accepT'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'*'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` ]`)])])])])]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@see`),t(`span`,{class:`twoslash-popup-docs-tag-value`},[t(`a`,{href:`https://github.com/nodejs/node/blob/v24.x/lib/http.js`},`source`)])])])],-1)]]),default:a(()=>[o[102]||=t(`span`,null,`http`,-1)]),_:1})]),o[109]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,W,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[103]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.IncomingMessage, `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.ServerResponse>(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`requestListener`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` http`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`RequestListener`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.IncomingMessage, `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.ServerResponse> `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` http`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`Server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.IncomingMessage, `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.ServerResponse> (+`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`1`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` overload`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Returns a new instance of`),r(` `),t(`p`,null,`Server`),r(` `),t(`p`,null,`.`),r(` `),t(`p`,null,[r(`The `),t(`code`,null,`requestListener`),r(` is a function which is automatically added to the `),t(`code`,null,`'request'`),r(` event.`)]),r(` `),t(`code`,null,[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'node:http'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`;`)]),r(` `),t(`span`,{class:`line`}),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},`// Create a local server to receive data from`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` =`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`((`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`req`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`res`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`) `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`=>`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` res.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`writeHead`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`200`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, { `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'Content-Type'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'application/json'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` });`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` res.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`end`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`JSON`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`stringify`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` data: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'Hello World!'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` }));`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`});`)]),r(` `),t(`span`,{class:`line`}),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`server.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`listen`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`8000`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`);`)])])])]),r(` `),t(`code`,null,[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'node:http'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`;`)]),r(` `),t(`span`,{class:`line`}),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},`// Create a local server to receive data from`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` =`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`();`)]),r(` `),t(`span`,{class:`line`}),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},`// Listen to the request event`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`server.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`on`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'request'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, (`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`request`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`res`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`) `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`=>`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` res.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`writeHead`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`200`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, { `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'Content-Type'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'application/json'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` });`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` res.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`end`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`JSON`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`stringify`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` data: `),t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'Hello World!'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` }));`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`});`)]),r(` `),t(`span`,{class:`line`}),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`server.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`listen`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`8000`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`);`)])])])])]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@since`),t(`span`,{class:`twoslash-popup-docs-tag-value`},`v0.1.13`)])])],-1)]]),default:a(()=>[o[104]||=t(`span`,null,`createServer`,-1)]),_:1})]),o[110]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`() `,-1),o[111]||=t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},`// or express, koa, etc.`,-1)]),o[168]||=r(` `,-1),o[169]||=t(`span`,{class:`line`},null,-1),o[170]||=r(` `,-1),t(`span`,G,[o[116]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`,-1),o[117]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` `,-1),t(`span`,K,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[112]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` vite`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ViteDevServer`)])],-1)]]),default:a(()=>[o[113]||=t(`span`,null,`vite`,-1)]),_:1})]),o[118]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` =`,-1),o[119]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` await`,-1),o[120]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` `,-1),t(`span`,q,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[114]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` createServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` |`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ResolvedConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`ViteDevServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)])],-1)]]),default:a(()=>[o[115]||=t(`span`,null,`createServer`,-1)]),_:1})]),o[121]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({`,-1)]),o[171]||=r(` `,-1),t(`span`,J,[o[124]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Y,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[122]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` middlewareMode`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: http.Server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},``),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` };`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` proxy`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` '/ws'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` target: string;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` ws: `),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`true`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` };`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` };`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`}`)])])])])],-1)]]),default:a(()=>[o[123]||=t(`span`,null,`server`,-1)]),_:1})]),o[125]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[172]||=r(` `,-1),o[173]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},` // Enable middleware mode`)],-1),o[174]||=r(` `,-1),t(`span`,X,[o[128]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Z,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[126]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`middlewareMode`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: http.Server`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},``),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`}`)])])])])],-1)]]),default:a(()=>[o[127]||=t(`span`,null,`middlewareMode`,-1)]),_:1})]),o[129]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[175]||=r(` `,-1),o[176]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},` // Provide the parent http server for proxy WebSocket`)],-1),o[177]||=r(` `,-1),t(`span`,re,[o[134]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,ie,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[130]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: HttpServer`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Parent server instance to attach to`),r(` `),t(`p`,null,`This is needed to proxy WebSocket connections to the parent server.`)])],-1)]]),default:a(()=>[o[131]||=t(`span`,null,`server`,-1)]),_:1})]),o[135]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),t(`span`,ae,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[132]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` parentServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` http`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`Server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.IncomingMessage, `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.ServerResponse>`)])],-1)]]),default:a(()=>[o[133]||=t(`span`,null,`parentServer`,-1)]),_:1})]),o[136]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[178]||=r(` `,-1),o[179]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` },`)],-1),o[180]||=r(` `,-1),t(`span`,oe,[o[139]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,se,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[137]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`pre`,{class:`shiki shiki-themes github-light github-dark`,style:{"--shiki-light":`#24292e`,"--shiki-dark":`#e1e4e8`,"--shiki-light-bg":`#fff`,"--shiki-dark-bg":`#24292e`},tabindex:`0`},[t(`code`,null,[t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`proxy`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` '/ws'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` target: string;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` ws: `),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`true`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`;`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` };`)]),r(` `),t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`}`)])])])])],-1)]]),default:a(()=>[o[138]||=t(`span`,null,`proxy`,-1)]),_:1})]),o[140]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[181]||=r(` `,-1),o[182]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` '/ws'`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`)],-1),o[183]||=r(` `,-1),t(`span`,ce,[o[143]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,le,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[141]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ServerOptions$3.target`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` ProxyTarget `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`URL string to be parsed with the url module.`)])],-1)]]),default:a(()=>[o[142]||=t(`span`,null,`target`,-1)]),_:1})]),o[144]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[145]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'ws://localhost:3000'`,-1),o[146]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[184]||=r(` `,-1),o[185]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}},` // Proxying WebSocket`)],-1),o[186]||=r(` `,-1),t(`span`,ue,[o[149]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,de,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[147]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ServerOptions$3.ws`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` boolean `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`If you want to proxy websockets.`)])],-1)]]),default:a(()=>[o[148]||=t(`span`,null,`ws`,-1)]),_:1})]),o[150]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[151]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`true`,-1),o[152]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[187]||=i("",11),t(`span`,Q,[t(`span`,fe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[153]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` parentServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` http`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`Server`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.IncomingMessage, `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`typeof`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` http.ServerResponse>`)])],-1)]]),default:a(()=>[o[154]||=t(`span`,null,`parentServer`,-1)]),_:1})]),o[159]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),o[160]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`use`,-1),o[161]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`,-1),t(`span`,pe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[155]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` vite`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ViteDevServer`)])],-1)]]),default:a(()=>[o[156]||=t(`span`,null,`vite`,-1)]),_:1})]),o[162]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,me,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[157]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ViteDevServer.middlewares: Connect.Server`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`A connect app instance.`),r(` `),t(`ul`,null,[r(` `),t(`li`,null,`Can be used to attach custom middlewares to the dev server.`),r(` `),t(`li`,null,`Can also be used as the handler function of a custom http server or as a middleware in any connect-style Node.js frameworks`),r(` `)]),r(` `),t(`p`,null,[t(`a`,{href:`https://github.com/senchalabs/connect#use-middleware`},`https://github.com/senchalabs/connect#use-middleware`)])])],-1)]]),default:a(()=>[o[158]||=t(`span`,null,`middlewares`,-1)]),_:1})]),o[163]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`,-1)])])])])])]),o[348]||=i("",13),t(`div`,he,[o[252]||=t(`div`,{class:`vp-code-block-title-bar`},[t(`span`,{class:`vp-code-block-title-text`,"data-title":`vite.config.js`},`vite.config.js`)],-1),t(`div`,ge,[o[250]||=t(`button`,{title:`Copy Code`,class:`copy`},null,-1),o[251]||=t(`span`,{class:`lang`},`ts`,-1),t(`pre`,_e,[t(`code`,null,[t(`span`,ve,[o[195]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`,-1),o[196]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,ye,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[193]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` path`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` path`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`PlatformPath`)])],-1)]]),default:a(()=>[o[194]||=t(`span`,null,`path`,-1)]),_:1})]),o[197]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),o[198]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`,-1),o[199]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'node:path'`,-1)]),o[241]||=r(` `,-1),t(`span`,be,[o[202]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`,-1),o[203]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` { `,-1),t(`span`,xe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[200]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` build`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`RolldownOutput`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` |`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` RolldownOutput`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`[] `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` RolldownWatcher`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Bundles a single environment for production. Returns a Promise containing the build result.`)])],-1)]]),default:a(()=>[o[201]||=t(`span`,null,`build`,-1)]),_:1})]),o[204]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` } `,-1),o[205]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`,-1),o[206]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'vite'`,-1)]),o[242]||=r(` `,-1),o[243]||=t(`span`,{class:`line`},null,-1),o[244]||=r(` `,-1),t(`span`,Se,[o[209]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`await`,-1),o[210]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` `,-1),t(`span`,Ce,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[207]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` build`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`RolldownOutput`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` |`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` RolldownOutput`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`[] `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` RolldownWatcher`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Bundles a single environment for production. Returns a Promise containing the build result.`)])],-1)]]),default:a(()=>[o[208]||=t(`span`,null,`build`,-1)]),_:1})]),o[211]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({`,-1)]),o[245]||=r(` `,-1),t(`span`,we,[o[220]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Te,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[212]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`UserConfig.root`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` string `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Project root directory. Can be an absolute path, or a path relative from the location of the config file itself.`)]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@default`),t(`span`,{class:`twoslash-popup-docs-tag-value`},`process.cwd()`)])])],-1)]]),default:a(()=>[o[213]||=t(`span`,null,`root`,-1)]),_:1})]),o[221]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),t(`span`,Ee,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[214]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` path`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` path`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`PlatformPath`)])],-1)]]),default:a(()=>[o[215]||=t(`span`,null,`path`,-1)]),_:1})]),o[222]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,De,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[216]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`path.PlatformPath.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`resolve`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`...`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`paths: string[]): string`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`The right-most parameter is considered {to}. Other parameters are considered an array of {from}.`),r(` `),t(`p`,null,`Starting from leftmost {from} parameter, resolves {to} to an absolute path.`),r(` `),t(`p`,null,`If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.`)]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@param`),t(`span`,{class:`twoslash-popup-docs-tag-value`},[t(`code`,null,`paths`),r(` A sequence of paths or path segments.`)])]),t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@throws`),t(`span`,{class:`twoslash-popup-docs-tag-value`},`{TypeError} if any of the arguments is not a string.`)])])],-1)]]),default:a(()=>[o[217]||=t(`span`,null,`resolve`,-1)]),_:1})]),o[223]||=i("",5),t(`span`,Oe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[218]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`ImportMeta.dirname: string`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`The directory name of the current module.`),r(` `),t(`p`,null,[r(`This is the same as the `),t(`code`,null,`path.dirname()`),r(` of the `),t(`code`,null,`import.meta.filename`),r(`.`)]),r(` `),t(`blockquote`,null,[r(` `),t(`p`,null,[t(`strong`,null,`Caveat`),r(`: only present on `),t(`code`,null,`file:`),r(` modules.`)]),r(` `)])]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@since`),t(`span`,{class:`twoslash-popup-docs-tag-value`},`v21.2.0, v20.11.0`)])])],-1)]]),default:a(()=>[o[219]||=t(`span`,null,`dirname`,-1)]),_:1})]),o[224]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `,-1),o[225]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'./project'`,-1),o[226]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`),`,-1)]),o[246]||=r(` `,-1),t(`span`,ke,[o[229]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Ae,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[227]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`UserConfig.base`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` string `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Base public path when served in development or production.`)]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@default`),t(`span`,{class:`twoslash-popup-docs-tag-value`},`'/'`)])])],-1)]]),default:a(()=>[o[228]||=t(`span`,null,`base`,-1)]),_:1})]),o[230]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[231]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},`'/foo/'`,-1),o[232]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[247]||=r(` `,-1),t(`span`,je,[o[235]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Me,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[233]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`build`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` BuildEnvironmentOptions `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Build specific options`)])],-1)]]),default:a(()=>[o[234]||=t(`span`,null,`build`,-1)]),_:1})]),o[236]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[248]||=r(` `,-1),t(`span`,Ne,[o[239]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Pe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[237]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`BuildEnvironmentOptions.rollupOptions`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` RolldownOptions `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,[r(`Alias to `),t(`code`,null,`rolldownOptions`)])]),t(`div`,{class:`twoslash-popup-docs twoslash-popup-docs-tags vp-doc`},[t(`span`,{class:`twoslash-popup-docs-tag`},[t(`span`,{class:`twoslash-popup-docs-tag-name`},`@deprecated`),t(`span`,{class:`twoslash-popup-docs-tag-value`},[r(`Use `),t(`code`,null,`rolldownOptions`),r(` instead.`)])])])],-1)]]),default:a(()=>[o[238]||=t(`span`,null,`rollupOptions`,-1)]),_:1})]),o[240]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[249]||=i("",8)])])])]),o[349]||=i("",4),t(`div`,Fe,[o[313]||=t(`button`,{title:`Copy Code`,class:`copy`},null,-1),o[314]||=t(`span`,{class:`lang`},`ts`,-1),t(`pre`,Ie,[t(`code`,null,[t(`span`,Le,[o[255]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`import`,-1),o[256]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` { `,-1),t(`span`,Re,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[253]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` preview`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`PreviewServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Starts the Vite server in preview mode, to simulate a production deployment`)])],-1)]]),default:a(()=>[o[254]||=t(`span`,null,`preview`,-1)]),_:1})]),o[257]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` } `,-1),o[258]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`from`,-1),o[259]||=t(`span`,{style:{"--shiki-light":`#032F62`,"--shiki-dark":`#9ECBFF`}},` 'vite'`,-1)]),o[303]||=r(` `,-1),o[304]||=t(`span`,{class:`line`},null,-1),o[305]||=r(` `,-1),t(`span`,ze,[o[264]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`,-1),o[265]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` `,-1),t(`span`,Be,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[260]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` previewServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` PreviewServer`)])],-1)]]),default:a(()=>[o[261]||=t(`span`,null,`previewServer`,-1)]),_:1})]),o[266]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` =`,-1),o[267]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` await`,-1),o[268]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` `,-1),t(`span`,Ve,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[262]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` preview`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`inlineConfig`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` InlineConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` Promise`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`PreviewServer`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Starts the Vite server in preview mode, to simulate a production deployment`)])],-1)]]),default:a(()=>[o[263]||=t(`span`,null,`preview`,-1)]),_:1})]),o[269]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({`,-1)]),o[306]||=r(` `,-1),o[307]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#6A737D`,"--shiki-dark":`#6A737D`}}," // any valid user config options, plus `mode` and `configFile`")],-1),o[308]||=r(` `,-1),t(`span`,He,[o[272]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Ue,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[270]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`UserConfig.preview`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` PreviewOptions `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Preview specific options, e.g. host, port, https...`)])],-1)]]),default:a(()=>[o[271]||=t(`span`,null,`preview`,-1)]),_:1})]),o[273]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: {`,-1)]),o[309]||=r(` `,-1),t(`span`,We,[o[276]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,Ge,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[274]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`CommonServerOptions.port`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` number `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on.`)])],-1)]]),default:a(()=>[o[275]||=t(`span`,null,`port`,-1)]),_:1})]),o[277]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[278]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`8080`,-1),o[279]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[310]||=r(` `,-1),t(`span`,Ke,[o[282]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` `,-1),t(`span`,qe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[280]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`CommonServerOptions.open`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` string `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` boolean `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Open browser window on startup`)])],-1)]]),default:a(()=>[o[281]||=t(`span`,null,`open`,-1)]),_:1})]),o[283]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[284]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`true`,-1),o[285]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`,`,-1)]),o[311]||=i("",7),t(`span`,Je,[t(`span`,Ye,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[286]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` previewServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` PreviewServer`)])],-1)]]),default:a(()=>[o[287]||=t(`span`,null,`previewServer`,-1)]),_:1})]),o[290]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,Xe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[288]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`PreviewServer.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`printUrls`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(): `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`void`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Print server urls`)])],-1)]]),default:a(()=>[o[289]||=t(`span`,null,`printUrls`,-1)]),_:1})]),o[291]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`()`,-1)]),o[312]||=r(` `,-1),t(`span`,Ze,[t(`span`,Qe,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[292]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` previewServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` PreviewServer`)])],-1)]]),default:a(()=>[o[293]||=t(`span`,null,`previewServer`,-1)]),_:1})]),o[298]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`.`,-1),t(`span`,$e,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[294]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`PreviewServer.`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`bindCLIShortcuts`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(options`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` BindCLIShortcutsOptions`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`<`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`PreviewServer`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`>`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`): `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`void`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Bind CLI shortcuts`)])],-1)]]),default:a(()=>[o[295]||=t(`span`,null,`bindCLIShortcuts`,-1)]),_:1})]),o[299]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`({ `,-1),t(`span`,et,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[296]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`print`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` boolean `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`|`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` undefined`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Print a one-line shortcuts "help" hint to the terminal`)])],-1)]]),default:a(()=>[o[297]||=t(`span`,null,`print`,-1)]),_:1})]),o[300]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: `,-1),o[301]||=t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`true`,-1),o[302]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` })`,-1)])])])]),o[350]||=i("",10),t(`div`,tt,[o[343]||=t(`p`,{class:`custom-block-title`},`NOTE`,-1),o[344]||=t(`p`,null,[t(`code`,null,`mergeConfig`),r(` accepts only config in object form. If you have a config in callback form, you should call it before passing into `),t(`code`,null,`mergeConfig`),r(`.`)],-1),o[345]||=t(`p`,null,[r(`You can use the `),t(`code`,null,`defineConfig`),r(` helper to merge a config in callback form with another config:`)],-1),t(`div`,nt,[o[341]||=t(`button`,{title:`Copy Code`,class:`copy`},null,-1),o[342]||=t(`span`,{class:`lang`},`ts`,-1),t(`pre`,rt,[t(`code`,null,[t(`span`,it,[o[319]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`export`,-1),o[320]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},` default`,-1),o[321]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` `,-1),t(`span`,at,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[315]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`function`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` defineConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`config`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` UserConfigFnObject`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` UserConfigFnObject`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` (+`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},`5`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` overloads`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`)]),t(`div`,{class:`twoslash-popup-docs vp-doc`},[t(`p`,null,`Type helper to make it easier to use vite.config.ts accepts a direct`),r(` `),t(`p`,null,`UserConfig`),r(` `),t(`p`,null,`object, or a function that returns it. The function receives a`),r(` `),t(`p`,null,`ConfigEnv`),r(` `),t(`p`,null,`object.`)])],-1)]]),default:a(()=>[o[316]||=t(`span`,null,`defineConfig`,-1)]),_:1})]),o[322]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`((`,-1),t(`span`,ot,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[317]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`configEnv`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: ConfigEnv`)])],-1)]]),default:a(()=>[o[318]||=t(`span`,null,`configEnv`,-1)]),_:1})]),o[323]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`) `,-1),o[324]||=t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`=>`,-1)]),o[338]||=r(` `,-1),t(`span`,st,[o[333]||=t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` `,-1),t(`span`,ct,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[325]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`mergeConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`<`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`UserConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`, `),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`UserConfig`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`>(defaults: UserConfig, overrides: UserConfig, isRoot`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`?:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` boolean): Record`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`<`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`string, any`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`>`)])],-1)]]),default:a(()=>[o[326]||=t(`span`,null,`mergeConfig`,-1)]),_:1})]),o[334]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`,-1),t(`span`,lt,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[327]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` configAsCallback`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},` (`),t(`span`,{style:{"--shiki-light":`#E36209`,"--shiki-dark":`#FFAB70`}},`env`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` ConfigEnv`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`) `),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`=>`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` UserConfig`)])],-1)]]),default:a(()=>[o[328]||=t(`span`,null,`configAsCallback`,-1)]),_:1})]),o[335]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`(`,-1),t(`span`,ut,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[329]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},`configEnv`),t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`: ConfigEnv`)])],-1)]]),default:a(()=>[o[330]||=t(`span`,null,`configEnv`,-1)]),_:1})]),o[336]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`), `,-1),t(`span`,dt,[e($,{class:`twoslash-hover`,"popper-class":`shiki twoslash-floating vp-copy-ignore`,theme:`twoslash`},{popper:a(({})=>[...o[331]||=[t(`span`,{class:`twoslash-popup-container vp-copy-ignore`},[t(`code`,{class:`twoslash-popup-code`},[t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`const`),t(`span`,{style:{"--shiki-light":`#005CC5`,"--shiki-dark":`#79B8FF`}},` configAsObject`),t(`span`,{style:{"--shiki-light":`#D73A49`,"--shiki-dark":`#F97583`}},`:`),t(`span`,{style:{"--shiki-light":`#6F42C1`,"--shiki-dark":`#B392F0`}},` UserConfig`)])],-1)]]),default:a(()=>[o[332]||=t(`span`,null,`configAsObject`,-1)]),_:1})]),o[337]||=t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`),`,-1)]),o[339]||=r(` `,-1),o[340]||=t(`span`,{class:`line`},[t(`span`,{style:{"--shiki-light":`#24292E`,"--shiki-dark":`#E1E4E8`}},`)`)],-1)])])])]),o[351]||=i("",48)])}var pt=ne(s,[[`render`,ft]]);export{o as __pageData,pt as default};