ligershark / WebOptimizer

A bundler and minifier for ASP.NET Core
Apache License 2.0
750 stars 113 forks source link

CSS minify error CSS1030 #275

Open fouadalnahhal opened 1 year ago

fouadalnahhal commented 1 year ago

result: /* input(21,3602): run-time error CSS1030: Expected identifier, found '.' input(21,3618): run-time error CSS1025: Expected comma or open brace, found ')' input(21,4051): run-time error CSS1030: Expected identifier, found '.' input(21,4067): run-time error CSS1025: Expected comma or open brace, found ')' ...

paator commented 4 months ago

I experience the same issue in my styles.

EDIT: Upon further inspection, it turned out to be a real CSS error, albeit very hard to spot. In the Blazor server-side exported output, there was a random dot:

.class .{ }

These were bundled component-scoped styles in a single file. The error syntax indicating the line that triggered the error was incorrect. However, I managed to identify the issue manually.