You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed the package postcss-discard-comments in my existing NPM project.
It removed comments as I wanted but it also removed whitespaces out of comments unexpectedly.
I have not installed cssnano, actually the postcss-discard-comments's NPM page give the link to cssnano's github page.
Expected behaviour
I expected it removes comments without removing whitespaces out of comments.
The best thing in my opinion to constat the bug and view my configuration is my commit that revealed the issue.
Steps to reproduce
May run for the first time postcss-discard-comments in an existing NPM project.
I might be missing something obvious, but I do not see where the white space changed inside comments in the commit you've linked (alcapitan/atui@2f5ab80#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519)? I do see white space changes but only outside of comments, for example the white space after the colon (:) disappears. Could you point me to a line where you see white space inside comments disappearing?
Sorry, I think I understand now what you mean by "out" of comments.
It's an interesting situation, I think it's the first time someones reports using the comment remover without the rest of cssnano. Why do you want to only remove comments without also minifying the CSS? It might be unfixable if the AST does not contain enough information about these spaces.
Sorry, I think I understand now what you mean by "out" of comments.
Yes indeed, I am not a native english speaker and I wrote with my live skills.
It's an interesting situation, I think it's the first time someones reports using the comment remover without the rest of cssnano. Why do you want to only remove comments without also minifying the CSS? It might be unfixable if the AST does not contain enough information about these spaces.
Yes, I can use CSSnano. But in my (surely questionable) NPM setup, I'm using Esbuild for minification.
Also this independent package exists, so it should work as expected. I just wanted to alert you to this strange behavior, in itself it is not a bug
Describe the bug
I installed the package
postcss-discard-comments
in my existing NPM project.It removed comments as I wanted but it also removed whitespaces out of comments unexpectedly.
I have not installed cssnano, actually the postcss-discard-comments's NPM page give the link to cssnano's github page.
Expected behaviour
I expected it removes comments without removing whitespaces out of comments.
The best thing in my opinion to constat the bug and view my configuration is my commit that revealed the issue.
Steps to reproduce
May run for the first time
postcss-discard-comments
in an existing NPM project.Version
6.0.0
Preset
(no preset)
Environment
Package details
Additional context
No response
The text was updated successfully, but these errors were encountered: