fix: move Worker config to separate file for Pages compatibility
Move wrangler.toml to worker/wrangler.toml to separate Worker and Pages configurations. Cloudflare Pages was trying to read wrangler.toml and failing because it contained Worker-specific configuration (Durable Objects, migrations, etc.) that Pages doesn't support. Changes: - Move wrangler.toml → worker/wrangler.toml - Update deploy scripts to use --config worker/wrangler.toml - Pages deployment now uses Cloudflare dashboard configuration only This resolves the deployment error: "Configuration file cannot contain both 'main' and 'pages_build_output_dir'" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9937a8fe16
commit
59d0b9a5ff
|
|
@ -11,9 +11,9 @@
|
|||
"build": "tsc && vite build",
|
||||
"build:worker": "wrangler build --config wrangler.dev.toml",
|
||||
"preview": "vite preview",
|
||||
"deploy": "tsc && vite build && wrangler deploy",
|
||||
"deploy": "tsc && vite build && wrangler deploy --config worker/wrangler.toml",
|
||||
"deploy:pages": "tsc && vite build",
|
||||
"deploy:worker": "wrangler deploy",
|
||||
"deploy:worker": "wrangler deploy --config worker/wrangler.toml",
|
||||
"deploy:worker:dev": "wrangler deploy --config wrangler.dev.toml",
|
||||
"types": "tsc --noEmit"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# Cloudflare Pages configuration
|
||||
pages_build_output_dir = "dist"
|
||||
|
||||
# Worker configuration (for Pages Functions)
|
||||
# Worker configuration
|
||||
# Note: This wrangler.toml is for the Worker backend only.
|
||||
# Pages deployment is configured separately in the Cloudflare dashboard.
|
||||
main = "worker/worker.ts"
|
||||
compatibility_date = "2024-07-01"
|
||||
name = "jeffemmett-canvas"
|
||||
Loading…
Reference in New Issue