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

Css minification fails on VS 2022 #482

Open
BootprojectStore opened this issue Nov 13, 2021 · 3 comments
Open

Css minification fails on VS 2022 #482

BootprojectStore opened this issue Nov 13, 2021 · 3 comments

Comments

@BootprojectStore
Copy link

BootprojectStore commented Nov 13, 2021

Installed product versions

  • Windows 11
  • Visual Studio 2022 Professional
  • Web Compiler 2022

Description

Minification fails
.icon:before { content: ""; }

Steps to recreate

  1. Create a new web project in VS 2022
  2. Add a test.scss file
  3. Write in scss file: .icon:before { content: "\ea02"; }

Current behavior

The unminified .css file is correct.

 .icon:before {
     content: "\ea02"; 
  }

The minified css file produces
.icon:before{ content:""; }

Expected behavior

.icon:before{content"\ea02";}

I tested the same code with several online tools like: https://www.sassmeister.com/ , to prove that my sass is correct.
I also tested to minify the code provided at for eg: https://www.toptal.com/developers/cssminifier/
The result is as expected and correct.

Any idea what causes this?

@BootprojectStore
Copy link
Author

BootprojectStore commented Nov 14, 2021

First!!I I must say thanks to Mads, for his dedication and creation of all the numerous of extensions you made by the years. :-)

So, I'm just trying to find the solution to my problem.

I inverstigated the code this weekend.
I do suspect that the conversion when creating the file as UTF-8 is the bad boy here.

I also made a project where I minified css files and produced the css files as [filename].min.css.gz (.NET6 generation Gzip)
All of the generated files generated correct minification.
The code i used is my ThemeBuilder

"Please let me know if there's something I can do."

@figloalds
Copy link

Go to %temp%
Rename WebCompiler1.12.5 to WebCompiler1.12.5.old
and rename the previous version you had on VS2019 to WebCompiler1.12.5
See if that works

@jishansiddique
Copy link

I'm also facing the same issue in the Visual studio 2022 community version.
Can anyone suggest/help how to solve the issue?

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

No branches or pull requests

3 participants