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

🐛 [Bug]: vite less loader #330

Closed
1 of 3 tasks
songhn233 opened this issue Mar 11, 2022 · 6 comments
Closed
1 of 3 tasks

🐛 [Bug]: vite less loader #330

songhn233 opened this issue Mar 11, 2022 · 6 comments
Labels
🕵️‍♂️ bug Something isn't working

Comments

@songhn233
Copy link

Which React Vant packages are impacted?

  • react-vant (React Vant core)
  • @react-vant/cli
  • create-react-vant-cli-app

What version of React Vant are you using?

2.0.0-alpha.20

What version of Node are you using? Minimum supported version is 12.

16.0.0

Steps to Reproduce

运行官方 vite demo
image
重复引入大量全量 css 文件(在只 tree-shaking 引入 btn 的情况下)

打包后依然存在相同问题
image

看起来和这两个问题类似,应该是 less 被重复引入了

Expected Behavior

在 dev & build 下正常 tree shaking

Actual Behavior

重复全量引入多次

Context

No response

@3lang3
Copy link
Owner

3lang3 commented Mar 12, 2022

应该只有vite build有这个问题吧那?

@songhn233
Copy link
Author

songhn233 commented Mar 12, 2022

应该只有vite build有这个问题吧那?

vite dev 和 build 都有类似情况

@3lang3
Copy link
Owner

3lang3 commented Mar 13, 2022

我试了下,vite dev下确实重复引入了,vite build是全量打包了css,tree shaking没起作用,没出现重复的情况。

@3lang3 3lang3 added the 🕵️‍♂️ bug Something isn't working label Mar 14, 2022
@zcyc
Copy link

zcyc commented Apr 23, 2022

您好,这个修复了吗?

@3lang3
Copy link
Owner

3lang3 commented Apr 23, 2022

正在弄,近期会更新一版 升级整个vite的构建流程

@3lang3
Copy link
Owner

3lang3 commented Apr 27, 2022

最新版本已经修复
官方demo 已验证

@3lang3 3lang3 closed this as completed Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕵️‍♂️ bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants