fix: ENABLE_CLOUDFLARE_IMAGE
This commit is contained in:
@@ -11,8 +11,7 @@ if (!wpUrl) {
|
||||
}
|
||||
const wpDomain = new URL(wpUrl).hostname;
|
||||
|
||||
const isDev = process.env.NODE_ENV !== "production";
|
||||
const isWranglerDev = process.env.WRANGLER_ENV === "dev";
|
||||
const enableCloudflareImage = Boolean(process.env.ENABLE_CLOUDFLARE_IMAGE);
|
||||
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
@@ -103,7 +102,7 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
image: {
|
||||
provider: isDev || isWranglerDev ? "none" : "cloudflare",
|
||||
provider: enableCloudflareImage ? "cloudflare" : "none",
|
||||
cloudflare: { baseURL: `${siteUrl}/` },
|
||||
domains: [wpDomain],
|
||||
format: ["avif", "webp"],
|
||||
|
||||
Reference in New Issue
Block a user