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

vue文件id 算法修改 #1991

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

vue文件id 算法修改 #1991

wants to merge 2 commits into from

Conversation

VICTORYGS
Copy link

1:由于为了实现组件样式的scoped,每个css属性都必须附加上[data-v-xxxxxxxx]这样的属性。这样导致css资源大小会被扩大,感觉目前的hash有点长,不够简洁。


2:时间上会有略微的提升。目前的算法,当生产环境时,为了防止碰撞,加上的source,此时hash运算会更加耗时。

改成计数标记id,之后转化为36进制缩短id字符长度
复用 shortFilePath 计算结果,避免重复计算
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

Successfully merging this pull request may close these issues.

None yet

1 participant