Files
React/wrangler.jsonc

48 lines
1.4 KiB
JSON

{
"$schema": "./.vitepress/node_modules/wrangler/config-schema.json",
// VitePress 纯静态站点,使用 Cloudflare Workers Static Assets 托管(无 Worker 脚本)
"name": "react-isharkfly-com",
"compatibility_date": "2026-06-25",
"assets": {
// vitepress build 默认输出目录(相对项目根目录)
"directory": ".vitepress/dist",
// VitePress 会生成 404.html
"not_found_handling": "404-page",
"html_handling": "auto-trailing-slash"
},
// 允许 PR / 分支通过 versions upload 生成 Preview URL
"preview_urls": true,
// `wrangler preview`(新版 Previews)要求存在 previews 块,可以为空;
// assets、兼容性设置等仍沿用顶层配置
"previews": {},
"observability": {
"enabled": false,
"head_sampling_rate": 1,
"logs": {
"enabled": true,
"head_sampling_rate": 1,
"persist": true,
"invocation_logs": true
},
"traces": {
"enabled": false,
"persist": true,
"head_sampling_rate": 1
}
},
"env": {
// Tag 构建部署到此环境:Worker 名称为 react-isharkfly-com-production
"production": {
"assets": {
"directory": ".vitepress/dist",
"not_found_handling": "404-page",
"html_handling": "auto-trailing-slash"
}
// DNS 切换到 Cloudflare 后再启用自定义域名:
// "routes": [{ "pattern": "react.isharkfly.com", "custom_domain": true }]
}
}
}