Skip to content
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

5.0.0-alpha.2 样式丢失 vite react #37991

Closed
ALongLi opened this issue Oct 13, 2022 · 6 comments
Closed

5.0.0-alpha.2 样式丢失 vite react #37991

ALongLi opened this issue Oct 13, 2022 · 6 comments

Comments

@ALongLi
Copy link

ALongLi commented Oct 13, 2022

Reproduction link

https://github.com/ALongLi/vitejs-vite-tdbz72

Steps to reproduce

运行直接看到

What is expected?

样式正常

What is actually happening?

样式丢失

Environment Info
antd undefined
React 18
System win10
Browser chrome87

在stackblitz 样式正常显示, 在 本地 win10 机器中运行后样式丢失
image

image

@ALongLi
Copy link
Author

ALongLi commented Oct 13, 2022

补充: 应该是浏览器兼容性问题 ,edge 106.0.1370.37 版本能正常显示样式,chrome 87.0.4280.66不显示样式

@ALongLi
Copy link
Author

ALongLi commented Oct 13, 2022

image

:where(.css-dev-only-do-not-override-18jsc2e).ant-btn-dashed.ant-btn-dangerous

where chrome87 不支持

@zombieJ
Copy link
Member

zombieJ commented Oct 13, 2022

截屏2022-10-13 11 38 17

@zombieJ
Copy link
Member

zombieJ commented Oct 13, 2022

这个之前有考虑过是否要自动降级,但是想到自动降级会导致在不同游览器里 selector 权重不一致。所以这边就没有处理。还是按照 last 2 version 的规则来了。

@zombieJ zombieJ closed this as completed Oct 13, 2022
@ALongLi
Copy link
Author

ALongLi commented Oct 13, 2022

这个太激进了吧,支持现代 JavaScript 语法的浏览器都不能运行了, chrome版本升的那么快,用使用率应该会更好吧

@ALongLi
Copy link
Author

ALongLi commented Oct 13, 2022

或者有什么方式 能支持到 Chrome >=87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants