latest update to fix cloudflare
This commit is contained in:
parent
256dfa2110
commit
4894f1e439
|
|
@ -0,0 +1,37 @@
|
|||
# Cloudflare Pages Configuration
|
||||
|
||||
## Issue
|
||||
Cloudflare Pages cannot use the same `wrangler.toml` file as Workers because:
|
||||
- `wrangler.toml` contains Worker-specific configuration (main, account_id, triggers, etc.)
|
||||
- Pages projects have different configuration requirements
|
||||
- Pages cannot have both `main` and `pages_build_output_dir` in the same file
|
||||
|
||||
## Solution: Configure in Cloudflare Dashboard
|
||||
|
||||
Since `wrangler.toml` is for Workers only, configure Pages settings in the Cloudflare Dashboard:
|
||||
|
||||
### Steps:
|
||||
1. Go to [Cloudflare Dashboard](https://dash.cloudflare.com/)
|
||||
2. Navigate to **Pages** → Your Project
|
||||
3. Go to **Settings** → **Builds & deployments**
|
||||
4. Configure:
|
||||
- **Build command**: `npm run build`
|
||||
- **Build output directory**: `dist`
|
||||
- **Root directory**: `/` (or leave empty)
|
||||
5. Save settings
|
||||
|
||||
### Alternative: Use Environment Variables
|
||||
If you need to configure Pages via code, you can set environment variables in the Cloudflare Pages dashboard under **Settings** → **Environment variables**.
|
||||
|
||||
## Worker Deployment
|
||||
Workers are deployed separately using:
|
||||
```bash
|
||||
npm run deploy:worker
|
||||
```
|
||||
or
|
||||
```bash
|
||||
wrangler deploy
|
||||
```
|
||||
|
||||
The `wrangler.toml` file is used only for Worker deployments, not Pages.
|
||||
|
||||
|
|
@ -134,5 +134,6 @@ The Fathom transcript shape includes:
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -85,5 +85,6 @@ You can also manually edit the environment by:
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -262,5 +262,6 @@ export const LocationDashboard: React.FC = () => {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -233,5 +233,6 @@ export const LocationMap: React.FC<LocationMapProps> = ({
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -175,5 +175,6 @@ export const LocationViewer: React.FC<LocationViewerProps> = ({ shareToken }) =>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -142,5 +142,6 @@ export const ShareSettingsComponent: React.FC<ShareSettingsProps> = ({ onSetting
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -417,5 +417,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -47,5 +47,6 @@ export interface GeolocationPosition {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,5 +29,6 @@ export const LocationDashboardRoute: React.FC = () => {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,5 +29,6 @@ export const LocationShareCreate: React.FC = () => {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,5 +43,6 @@ export const LocationShareView: React.FC = () => {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,5 +64,6 @@ echo " npm run dev"
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@ compatibility_date = "2024-07-01"
|
|||
name = "jeffemmett-canvas"
|
||||
account_id = "0e7b3338d5278ed1b148e6456b940913"
|
||||
|
||||
# Cloudflare Pages configuration
|
||||
pages_build_output_dir = "dist"
|
||||
|
||||
[vars]
|
||||
# Environment variables are managed in Cloudflare Dashboard
|
||||
# Workers & Pages → jeffemmett-canvas → Settings → Variables
|
||||
|
|
|
|||
Loading…
Reference in New Issue