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

fix(nuxt): Custom option priority in cssnano #3679

Merged
merged 1 commit into from Apr 5, 2024

Conversation

Simon-He95
Copy link
Contributor

close: #3604

@Simon-He95 Simon-He95 requested a review from antfu as a code owner April 2, 2024 02:25
Copy link

netlify bot commented Apr 2, 2024

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c9968d4
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/660b6c82f46b6b00085e040f
😎 Deploy Preview https://deploy-preview-3679--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@sibbng sibbng left a comment

Choose a reason for hiding this comment

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

It's nice to have, but I'm sceptical about whether it solves the issue. These options are only enforced when using vite builder, and esbuild already removes comments unless explicitly disabled.

cssnano's discardComments optimization was causing issues with empty CSS variables for older browsers (Chrome <= 98), that is why it's disabled.

There is a chance that the underlying issue in #3604 is something else.

@Simon-He95
Copy link
Contributor Author

It's nice to have, but I'm sceptical about whether it solves the issue. These options are only enforced when using vite builder, and esbuild already removes comments unless explicitly disabled.很高兴拥有,但我怀疑它是否能解决问题。这些选项仅在使用 vite builder 时强制执行,并且 esbuild 已删除注释,除非明确禁用。

cssnano's discardComments optimization was causing issues with empty CSS variables for older browsers (Chrome <= 98), that is why it's disabled.cssnano 的 discardComments 优化导致旧版浏览器 (Chrome <= 98) 出现空 CSS 变量问题,这就是它被禁用的原因。

There is a chance that the underlying issue in #3604 is something else.#3604 中的根本问题可能是其他问题。

Maybe you are right, but according to what he mentioned in this issue, the customized attribute settings are overwritten by the default ones. I think this point can be solved.

@antfu antfu merged commit 4e11d62 into unocss:main Apr 5, 2024
9 checks passed
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.

Custom option: discardComments
3 participants