feat: 支持一键部署到腾讯云 EdgeOne Pages - #105
Open
ShiYuanS wants to merge 1 commit into
Open
Conversation
将选点页面后端从 Hono 改为零依赖(纯 Web 标准 API),使 Cloudflare Workers / Cloudflare Pages / EdgeOne Pages 三端共用同一份代码。 - 新增 worker/edge-functions/ 边缘函数入口(适配 EdgeOne V8 运行时,不支持 npm 包) - 新增 worker/edgeone.json 构建配置 - 新增 .github/workflows/deploy-edgeone.yml 一键部署工作流 - worker/src/index.js 重写为平台无关的 handleRequest - 移除 hono 依赖并同步 package-lock.json - README 新增「部署到腾讯云 EdgeOne Pages」章节
Owner
|
感谢贡献!但暂时无法合入这个 PR,原因如下: 关于移除 Hono: 项目选用 Hono 是经过考虑的:
重写为零依赖纯手工路由,虽然减少了一个依赖,但增加了维护成本且容易出 bug。 关于高德地图异常: PR 描述中提到「高德地图始终显示深圳」,但没有给出:
请补充以上信息,方便定位问题。 建议: 如果想支持 EdgeOne 部署,建议以「新增 EdgeOne 适配层」的方式提 PR,而不是重写现有 Worker 核心代码。可以新增一个独立的 edge-functions 入口调用现有的 handleRequest 逻辑,保持 Cloudflare 侧代码不变。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本次修改主要为项目增加对腾讯 EO Makers 平台的部署支持,调整了构建和资源配置。经测试:
苹果地图(系统定位)功能正常,可修改位置;
高德地图(Web JS API)存在定位异常,无论实际位置在哪,地图始终显示为深圳(。
,恳请维护者协助,非常感谢!
将选点页面后端从 Hono 改为零依赖(纯 Web 标准 API),使 Cloudflare Workers / Cloudflare Pages / EdgeOne Pages 三端共用同一份代码。
新增 worker/edge-functions/ 边缘函数入口(适配 EdgeOne V8 运行时,不支持 npm 包)
新增 worker/edgeone.json 构建配置
新增 .github/workflows/deploy-edgeone.yml 一键部署工作流
worker/src/index.js 重写为平台无关的 handleRequest
移除 hono 依赖并同步 package-lock.json
README 新增「部署到腾讯云 EdgeOne Pages」章节