[GH-ISSUE #150] ios14系统以下,访问一直转圈圈 #105

Closed
opened 2026-02-27 09:13:18 +03:00 by kerem · 1 comment
Owner

Originally created by @hui122667209 on GitHub (Oct 9, 2025).
Original GitHub issue: https://github.com/maillab/cloud-mail/issues/150

safari 夸克 edge浏览器均无法正常访问主页面。安卓版和桌面端浏览器访问都是正常的。

Originally created by @hui122667209 on GitHub (Oct 9, 2025). Original GitHub issue: https://github.com/maillab/cloud-mail/issues/150 safari 夸克 edge浏览器均无法正常访问主页面。安卓版和桌面端浏览器访问都是正常的。
kerem 2026-02-27 09:13:18 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@hui122667209 commented on GitHub (Oct 12, 2025):

解决办法:

1.完全兼容 iOS 12+ 浏览器:必须使用 @vitejs/plugin-legacy,并加 regenerator-runtime/runtime

2.降级代码避免顶层 await,如果你不想用 legacy 插件,可以把 main.js 的顶层 await 改成异步函数

3.build.target 不要高于 es2015,否则 legacy 插件可能无法生成完整 ES5 代码

注意:涉及到的文件在mail-vue里

package.json

vite.config.js

main.js

安装注意:

数据对应不一致,需要删除\mail-vue里面的lock文件,然后重新生成

pnpm install vite@7.1.5 --save-dev
npm install vite@7.1.5 --save-dev
npm install -D @vitejs/plugin-vue@6.0.1
npm install -D @vitejs/plugin-legacy@7.2.1 --legacy-peer-deps
npm install regenerator-runtime --save

npm run build

最后重新部署即可

<!-- gh-comment-id:3393991927 --> @hui122667209 commented on GitHub (Oct 12, 2025): 解决办法: 1.完全兼容 iOS 12+ 浏览器:必须使用 @vitejs/plugin-legacy,并加 regenerator-runtime/runtime 2.降级代码避免顶层 await,如果你不想用 legacy 插件,可以把 main.js 的顶层 await 改成异步函数 3.build.target 不要高于 es2015,否则 legacy 插件可能无法生成完整 ES5 代码 注意:涉及到的文件在mail-vue里 package.json vite.config.js main.js 安装注意: 数据对应不一致,需要删除\mail-vue里面的lock文件,然后重新生成 pnpm install vite@7.1.5 --save-dev npm install vite@7.1.5 --save-dev npm install -D @vitejs/plugin-vue@6.0.1 npm install -D @vitejs/plugin-legacy@7.2.1 --legacy-peer-deps npm install regenerator-runtime --save npm run build 最后重新部署即可
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloud-mail-maillab#105
No description provided.