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
perf: minify css only when needed #5178
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why this is better?
Currently I read that there is a css
variable in line 313
This is also used in line 322/320
Now that the else statement is not there anymore, the css
variable gets minified also if line 313 gets executed.
Was this intended?
Good catch @Shinigami92, corrected the code to avoid minification when not inlined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, now it makes sense 👍
I had read somewhere that minifying allow for faster parsing so if this is true then if this css file will be parsed for e.g if a css class will be used then the analysis could be faster if minified. |
Description
Avoid minifying CSS if it isn't going to be used.
What is the purpose of this pull request?