Bundling issues with MVC and css varaiables

Viewed 392

While developing a MVC5 project, I have installed the Bundler and Minifier extension on my VS2019. I am struggling bundling and minifying css and JS coming from Uikit. Uikit as Bootstrap 4 uses css variables such as:

--uk-breakpoint-s:640px;
--uk-breakpoint-l:1200px;
{--uk-leader-fill-content:.}
var(--uk-animation-stroke)
...

In VS2019, I am able to use the Bundler & Minifier tool to generate .min. files but when I build or publish my site, I keep getting in my browser:

/* Minification failed. Returning unminified contents.
(2,3497): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(2,3521): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(2,3545): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(2,3570): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(2,64598): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(2,69161): run-time error CSS1039: Token not allowed after unary operator: '-uk-animation-stroke'
(2,71528): run-time error CSS1039: Token not allowed after unary operator: '-uk-animation-stroke'

Which means that obviously the bundler does not deal with css variables. I have read a lot and it looks like the Bundler & Minifier tool supports css variables so why my browser keeps me returning that this 'Minification failed' error?

0 Answers
Related