对 Cloudflare Worker 进行兼容

This commit is contained in:
2026-09-16 20:37:21 +08:00
parent 457fbec3e4
commit f195231f1d
4 changed files with 734 additions and 184 deletions
+5 -2
View File
@@ -8,7 +8,9 @@
"cache-images": "node scripts/cache-images.mjs",
"build": "next build",
"start": "next start",
"lint": "eslint"
"lint": "eslint",
"deploy": "wrangler deploy",
"preview": "wrangler dev"
},
"dependencies": {
"@fontsource-variable/noto-sans": "^5.3.0",
@@ -24,6 +26,7 @@
"@types/react-dom": "latest",
"eslint": "latest",
"eslint-config-next": "latest",
"typescript": "latest"
"typescript": "latest",
"wrangler": "4.132.0"
}
}
+717 -182
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -1,2 +1,4 @@
allowBuilds:
esbuild: true
unrs-resolver: true
workerd: true
+10
View File
@@ -0,0 +1,10 @@
{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "website",
"compatibility_date": "2026-09-16",
"assets": {
"directory": "./out",
"html_handling": "force-trailing-slash",
"not_found_handling": "404-page"
}
}