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

重新生成package-lock.json丢失css代码 #197

Closed
zzzzzhy opened this issue Sep 18, 2022 · 2 comments
Closed

重新生成package-lock.json丢失css代码 #197

zzzzzhy opened this issue Sep 18, 2022 · 2 comments

Comments

@zzzzzhy
Copy link

zzzzzhy commented Sep 18, 2022

我重新生成package-lock.json后,npm run build生成的js文件缺少了style的代码,请问这是什么原因引起的?
packag.json的内容我没有改动过

@zhaojh329
Copy link
Owner

为什么要重新生成 package-lock.json ?

@zzzzzhy
Copy link
Author

zzzzzhy commented Sep 19, 2022

找到问题了,vite版本的问题,"vite": "^3.0.4",这个没有固定在3.0.4,install之后会变成最新的3.1.2
目前vite3.1.0以上版本会有css丢失的问题vitejs/vite#10137
把"vite": "^3.0.4"改成"vite": "3.0.4"固定版本就没问题了

@zzzzzhy zzzzzhy closed this as completed Sep 19, 2022
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