fix: wrangler.json needed for wrangler types before build
All checks were successful
Deployment / wordpress (push) Successful in 7s
Deployment / nuxt (push) Successful in 1m2s

This commit is contained in:
2026-02-01 21:09:51 -05:00
parent 8d350bb092
commit faf39ca182
4 changed files with 254 additions and 246 deletions

View File

@@ -11,7 +11,7 @@ if (!wpUrl) {
}
const wpDomain = new URL(wpUrl).hostname;
const enableCloudflareImage = Boolean(process.env.ENABLE_CLOUDFLARE_IMAGE);
const enableCloudflareImages = Boolean(process.env.ENABLE_CLOUDFLARE_IMAGES);
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
@@ -57,15 +57,8 @@ export default defineNuxtConfig({
preset: "cloudflare_module",
cloudflare: {
deployConfig: true,
nodeCompat: true,
wrangler: {
// Project name
name: "wp-headless",
// Cloudflare Workers settings
compatibility_date: "2026-01-27",
observability: { enabled: true },
preview_urls: false,
// Environment variables
vars: {
NODE_ENV: "staging",
NUXT_SITE_URL: siteUrl,
@@ -102,7 +95,7 @@ export default defineNuxtConfig({
},
image: {
provider: enableCloudflareImage ? "cloudflare" : "none",
provider: enableCloudflareImages ? "cloudflare" : "none",
cloudflare: { baseURL: `${siteUrl}/` },
domains: [wpDomain],
format: ["avif", "webp"],

View File

@@ -11,7 +11,7 @@
"editor-style": "pnpx @tailwindcss/cli -i ./app/assets/css/_main.css -o ./editor-style.css --minify",
"lint": "eslint . --fix",
"postinstall": "pnpm --sequential /postinstall:.*/",
"postinstall:wrangler-types": "pnpm wrangler types ./server/types/cloudflare.d.ts",
"postinstall:wrangler-types": "wrangler types ./server/types/cloudflare.d.ts",
"postinstall:nuxt": "nuxt prepare",
"preview": "pnpm --sequential /preview:.*/",
"preview:build": "pnpm run build",
@@ -19,8 +19,7 @@
"release": "pnpm --sequential /release:.*/",
"release:lint": "eslint .",
"release:typecheck": "nuxt typecheck",
"release:changelogen": "changelogen --noAuthors --release --push",
"wrangler": "wrangler --config .output/server/wrangler.json"
"release:changelogen": "changelogen --noAuthors --release --push"
},
"dependencies": {
"@iconify-json/cib": "^1.2.3",

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
{
"$schema": "./node_modules/wrangler/config-schema.json",
"main": "./output/server/index.mjs",
"compatibility_date": "2026-01-27",
"compatibility_flags": [
"nodejs_compat"
],
"observability": {
"enabled": true
},
"preview_urls": false,
"assets": {
"binding": "ASSETS",
"directory": "../public"
}
}