Last active
October 29, 2024 08:57
-
-
Save boristane/d83d387e9c78e1159c511b3b79bbec30 to your computer and use it in GitHub Desktop.
nitro.config.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { type NitroPreset } from "nitropack"; | |
| export default (<NitroPreset>{ | |
| extends: "cloudflare", | |
| exportConditions: ["workerd"], | |
| output: { | |
| dir: "{{ rootDir }}/dist", | |
| publicDir: "{{ output.dir }}/public", | |
| serverDir: "{{ output.dir }}/worker", | |
| }, | |
| commands: { | |
| preview: "npx wrangler dev", | |
| deploy: "npx wrangler deploy", | |
| }, | |
| wasm: { | |
| lazy: true, | |
| esmImport: true, | |
| }, | |
| rollupConfig: { | |
| output: { | |
| entryFileNames: "index.js", | |
| format: "esm", | |
| exports: "named", | |
| inlineDynamicImports: true, | |
| }, | |
| }, | |
| experimental: { | |
| asyncContext: true, | |
| inlineRouteRules: true, | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment