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

开启optimizeSize时压缩组件名称和路径 #1517

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

kimi233
Copy link
Collaborator

@kimi233 kimi233 commented Jun 25, 2024

No description provided.

@@ -0,0 +1,105 @@
class CompressName {
constructor (chars, allowStartChars) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

存在过多没有必要性的设计,以时间&空间复杂度最优来进行即可

@@ -249,7 +249,8 @@ module.exports = function (content) {
}

// 注入模块id及资源路径
output += `global.currentModuleId = ${JSON.stringify(moduleId)}\n`
// currentModuleId -> _mid
output += `global._mid = ${JSON.stringify(moduleId)}\n`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

都简化了就简化彻底一点吧,比如global._id, global._i, global._i.r

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.

3 participants