feat: all of wrangler config in nuxt.config.ts

This commit is contained in:
2026-01-28 21:12:43 -05:00
parent b1b1aa47c9
commit 21a7036ef5
2 changed files with 13 additions and 23 deletions

View File

@@ -54,13 +54,24 @@ export default defineNuxtConfig({
deployConfig: true, deployConfig: true,
nodeCompat: true, nodeCompat: true,
wrangler: { wrangler: {
name: "foobar", // Project name
name: "moonshine",
// Cloudflare Workers settings
compatibility_date: "2026-01-27", compatibility_date: "2026-01-27",
main: "./.output/server/index.mjs",
observability: { enabled: true },
preview_urls: false,
// Environment variables
vars: { vars: {
NODE_ENV: "production", NODE_ENV: "staging",
NUXT_SITE_URL: siteUrl, NUXT_SITE_URL: siteUrl,
NUXT_WP_URL: wpUrl, NUXT_WP_URL: wpUrl,
}, },
// Bindings
assets: {
binding: "ASSETS",
directory: "./.output/public/",
},
}, },
}, },
}, },

View File

@@ -1,21 +0,0 @@
/**
* For more details on how to configure Wrangler, refer to:
* https://developers.cloudflare.com/workers/wrangler/configuration/
*/
{
"$schema": "node_modules/wrangler/config-schema.json",
"main": "./.output/server/index.mjs",
/**
* Static Assets Binding
*/
"assets": {
"binding": "ASSETS",
"directory": "./.output/public/"
},
/**
* Observability & Analytics
*/
"observability": {
"enabled": true
},
}