-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite2的版本的服务比较慢,导致首次加载页面时间太长,建议升级vite到3的版本 #2160
Comments
升级后加载main.ts不会再卡住pending了 |
提 PR? |
PR早提了 f44183e |
还需要再提一遍么? |
一个月了都,pr还没通过呢 |
这个有提过PR了 |
vite2.0升级3.0需要注意什么吗 |
@iconFehu 改成vite 3还是老样子,main.ts 需要 30s 等待,能看到页面需要 50s,你们解决了吗 |
@cnzdq |
@iconFehu hi, i have a problem when i upgrade vite 3 |
|
@iconFehu maybe i found the problem, the reason is "vite version 3.1.0" |
@nguyenhan-se vite-plugin-theme v0.8.6 and vite v3.1.0 may not be compatible |
@nguyenhan-se use vite 3.0.2 |
@iconFehu 我下了你的项目跑,虽然快了不少。但还是需要20s,不明白哪里不一样。你的是首次打开页面时的加载时间吗,就是从 pnpm dev 运行后第一次打开页面。首次加载完成之后,后面再刷新就很快了。我部署到云服务,不开启 gzip情况也是 15s,开启 gzip 后会快很多,大概3s |
More precisely, It's not working since vite 3.1.0-beta.1. |
@iconFehu 升级到3.0.9版本打包后,页面出现空白现象,无法访问。 |
Thanks four your suggestion, it has been fixed. |
额...满怀期待升级了一下 但是特意加载对比了, 好像没什么明显的提升.... |
我升级后发现也依然很慢,后来发现是这个插件build/vite/plugin/styleImport.ts按需加载antd的样式非常耗时,作者之前做了优化,只在生产环境启用。后来不知道为啥又注释了。可以还原这两段代码试试 |
更新后比之前快了30多秒,现在首加载16s左右,虽然还是有点长,确实比之前快多了
yeyuliang2015 ***@***.***> 于2022年8月16日周二 11:10写道:
… @M69W <https://github.com/M69W>
一个月了都,pr还没通过呢
这个有提过PR了
—
Reply to this email directly, view it on GitHub
<#2160 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFBXGICUGWKTDHKQ4EUP2KDVZMBDZANCNFSM56GPPNPQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
怎么开gzip?是用服务器端比如nginx打开gzip设置吗?还是前端项目这边比如.env配置VITE_BUILD_COMPRESS为gzip? |
升级过程中报错 COLOR_PLUGIN_OUTPUT_FILE_NAME is not defined请问这个怎么解决vite-plugin-theme |
什么时候可以升级到vite3 啊 |
你们升级到vite3打包后,没有出现页面空白的现象吗? @iconFehu |
|
这里注释的内容放在 |
@LuoHuacheng 在vite@4版本打包后能正常运行么?我这边打包后html文件中没有注入js文件 |
所以只能将到3.2.5版本 |
我在升级成vite3.0.x打包后也出现了同样的问题,请问您解决了嘛如何解决的 |
我的是一个插件导致的,把插件去掉就可以了 |
@houyaowei Hello,请教一下你们是去掉哪个插件解决白屏问题的? |
vite2的版本的服务比较慢,导致首次加载页面时间太长,建议升级vite到3的版本
The text was updated successfully, but these errors were encountered: