{"compiled":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n  const _components = {\n    a: \"a\",\n    code: \"code\",\n    figure: \"figure\",\n    h2: \"h2\",\n    hr: \"hr\",\n    p: \"p\",\n    pre: \"pre\",\n    span: \"span\",\n    strong: \"strong\",\n    table: \"table\",\n    tbody: \"tbody\",\n    td: \"td\",\n    th: \"th\",\n    thead: \"thead\",\n    tr: \"tr\",\n    ...props.components\n  }, {Box} = _components;\n  if (!Box) _missingMdxReference(\"Box\", true);\n  return _jsxs(_Fragment, {\n    children: [_jsxs(_components.p, {\n      children: [_jsx(_components.a, {\n        href: \"https://github.com/zely-js/zely/blob/main/packages/zely-js-cli/commands/build.ts\",\n        children: \"Source\"\n      }), \", \", _jsx(_components.code, {\n        children: \"zely build -h\"\n      })]\n    }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsxs(_components.p, {\n      children: [_jsx(_components.code, {\n        children: \"build\"\n      }), \" is a command that builds server.\"]\n    }), \"\\n\", _jsx(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"bash\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsx(_components.code, {\n          \"data-language\": \"bash\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#FFCB6B\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \"zely-cli\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" build\"\n            })]\n          })\n        })\n      })\n    }), \"\\n\", _jsx(Box, {\n      type: \"tip\",\n      children: _jsxs(_components.p, {\n        children: [\"If you want to check the available options and more details, please visit the \", _jsx(_components.a, {\n          href: \"/apis/build-server\",\n          children: \"API\\npage\"\n        }), \".\"]\n      })\n    }), \"\\n\", _jsx(_components.h2, {\n      children: \"Bundle\"\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [\"By default, the \", _jsx(_components.code, {\n        children: \"build\"\n      }), \" command does \", _jsx(_components.strong, {\n        children: \"not\"\n      }), \" bundle files into a single output to reduce build time.\\nIf you want to bundle everything into a single file, use the \", _jsx(_components.code, {\n        children: \"--bundle\"\n      }), \" flag:\"]\n    }), \"\\n\", _jsx(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"bash\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsx(_components.code, {\n          \"data-language\": \"bash\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#FFCB6B\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \"zely-cli\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" build\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#005CC5\"\n              },\n              children: \" --bundle\"\n            })]\n          })\n        })\n      })\n    }), \"\\n\", _jsx(_components.h2, {\n      children: \"Check Required Modules\"\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [\"To check which modules are required to run the built server, add the \", _jsx(_components.code, {\n        children: \"--emit-modules\"\n      }), \" flag.\"]\n    }), \"\\n\", _jsx(Box, {\n      type: \"info\",\n      children: _jsxs(_components.p, {\n        children: [\"This option is provided by the builder itself, not the CLI module. So you need to\\nprovide the flag in a way that the builder can interpret it correctly. Do \", _jsx(_components.strong, {\n          children: \"not\"\n        }), \" add\\nextra options like \", _jsx(_components.code, {\n          children: \"--emit-modules=true\"\n        }), \". Just use the \", _jsx(_components.code, {\n          children: \"--emit-modules\"\n        }), \" flag as is.\"]\n      })\n    }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.p, {\n      children: \"The console output will look like the following:\"\n    }), \"\\n\", _jsx(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"txt\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsxs(_components.code, {\n          \"data-language\": \"txt\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: [_jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \"yarn workspace @playground/typescript build --emit-modules\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \"[12:39:23 AM] info Compiling pages...\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - @zely-js/core        (in pages/index.ts) [runtime]\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - @zely-js/core        (in pages/[params]/test.ts) [runtime]\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - timers/promises      (in pages/[params]/test.ts)\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - @zely-js/core        (in pages/_404.ts) [runtime]\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \"[12:39:23 AM] info Compiling middlewares...\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \"[12:39:23 AM] info Compiling server...\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - @zely-js/core        (in zely.config.ts) [runtime]\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - @zely-js/zely        (in zely.config.ts) [runtime]\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - node:module          (in middlewares.mjs)\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - node:url             (in middlewares.mjs)\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \" - url                  (in middlewares.mjs)\"\n            })\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: \" \"\n          }), \"\\n\", _jsx(_components.span, {\n            \"data-line\": \"\",\n            children: _jsx(_components.span, {\n              children: \"[12:39:23 AM] info Done in 0.27s\"\n            })\n          })]\n        })\n      })\n    }), \"\\n\", _jsx(_components.h2, {\n      children: \"Arguments\"\n    }), \"\\n\", _jsxs(_components.table, {\n      children: [_jsx(_components.thead, {\n        children: _jsxs(_components.tr, {\n          children: [_jsx(_components.th, {\n            children: _jsx(_components.strong, {\n              children: \"option\"\n            })\n          }), _jsx(_components.th, {\n            children: _jsx(_components.strong, {\n              children: \"description\"\n            })\n          }), _jsx(_components.th, {\n            children: _jsx(_components.strong, {\n              children: \"default\"\n            })\n          })]\n        })\n      }), _jsxs(_components.tbody, {\n        children: [_jsxs(_components.tr, {\n          children: [_jsx(_components.td, {\n            children: _jsx(_components.code, {\n              children: \"--bundle\"\n            })\n          }), _jsx(_components.td, {\n            children: \"Bundle into a Single File\"\n          }), _jsx(_components.td, {\n            children: _jsx(_components.code, {\n              children: \"false\"\n            })\n          })]\n        }), _jsxs(_components.tr, {\n          children: [_jsx(_components.td, {\n            children: _jsx(_components.code, {\n              children: \"--emit-modules\"\n            })\n          }), _jsx(_components.td, {\n            children: \"Check Required modules\"\n          }), _jsx(_components.td, {\n            children: _jsx(_components.code, {\n              children: \"false\"\n            })\n          })]\n        })]\n      })]\n    })]\n  });\n}\nfunction MDXContent(props = {}) {\n  const {wrapper: MDXLayout} = props.components || ({});\n  return MDXLayout ? _jsx(MDXLayout, {\n    ...props,\n    children: _jsx(_createMdxContent, {\n      ...props\n    })\n  }) : _createMdxContent(props);\n}\nreturn {\n  default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n  throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","posts":[{"cli":"cli"},{"dev":"Developement Mode"},{"build":"Build Server"},{"init":"Init Project"},{"start":"Production Mode"},{"request":"Request Pages"},{"javascript-api":"Javascript API"},{"config":"Config"},{"create-server":"Create Server"},{"build-server":"Build Server"},{"virtual-page":"Virtual Pages"},{"core":"@zely-js/core"},{"store":"Store"},{"browser":"Browser (deprecated)"},{"builddev":"core.buildDev()"},{"controll":"core.controll()"},{"create-loader":"core.createLoader()"},{"create-virtual-page":"core.createVirtualPage()"},{"create-zely-server":"core.createZelyServer()"},{"default-sender":"core.defaultSender()"},{"logger":"core.logger"},{"page-cache":"core.PageCache"},{"structure":"Structure"},{"cache":"Cache"},{"fs":"FileSystem"},{"packages":"Packages"},{"senta":"Senta"},{"zely-js-cli":"zely-cli"},{"zely-js":"@zely-js/zely"},{"zely-js-core":"@zely-js/core"},{"zely-js-logger":"@zely-js/logger"},{"zely-js-static":"@zely-js/static"}],"target":{"build":"Build Server"},"targetcategory":"CLI","directory":"apis"}