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

build 时,对HTML中的link标签的处理有点不符合预期。 #6374

Closed
7 tasks done
lovelyyl opened this issue Jan 4, 2022 · 5 comments
Closed
7 tasks done
Labels
feat: css p2-nice-to-have Not breaking anything but nice to have (priority) pending triage

Comments

@lovelyyl
Copy link

lovelyyl commented Jan 4, 2022

Describe the bug

<link rel="stylesheet" href="/src/styles/default.less" disabled id="defaultThemeLink" />
编译的时候,直接把这个删除了,而不是用编译好的路径替换原有路径

Reproduction

System Info

vite v2.7.10

Used Package Manager

pnpm

Logs

No response

Validations

@lovelyyl lovelyyl changed the title build 时,对HTML种link标签的处理有点不符合预期。 build 时,对HTML中的link标签的处理有点不符合预期。 Jan 4, 2022
@poyoho
Copy link
Member

poyoho commented Jan 4, 2022

because the file has not reached the size of the package to be cut

@lovelyyl
Copy link
Author

lovelyyl commented Jan 5, 2022

This is the original index html
image

This is the HTML after build
image
我感觉不应该合并,应该单独打包,单独给路径的。
I don't think it should be merged. It should be packaged separately and given to the path separately

@bluwy
Copy link
Member

bluwy commented Apr 1, 2022

Currently Vite merges them because the behaviour without merging is the same. I'm curious what's your usecase here that requires this behaviour?

@bluwy
Copy link
Member

bluwy commented Apr 19, 2022

Revisiting this, it may be good if Vite takes the disabled attribute as heuristic to separate as two CSS files.

@bluwy bluwy added feat: css p2-nice-to-have Not breaking anything but nice to have (priority) labels Apr 19, 2022
@antfu
Copy link
Member

antfu commented May 17, 2022

Duplicate of #6748. Please use English to open issues next time.

@antfu antfu closed this as completed May 17, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: css p2-nice-to-have Not breaking anything but nice to have (priority) pending triage
Projects
None yet
Development

No branches or pull requests

4 participants