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"],