Angular-cli ng build --prod is stripping a unknown

2019-08-16 07:32发布

问题:

On an Angular application using the CLI i am doing a animated keyframe CSS where I am animating a SVG property r. This is getting stripped out of my production CSS when I run ng build --prod --aot. Is there a way to tell angular-cli to not strip out my CSS property?

@mixin dashing($r, $offset, $array) {
  r: $r;
  stroke-dashoffset: $offset;
  stroke-dasharray: $array; 
}

.myscss {
   @include dashing(54px, 171px, 171px);
}

ng build --prod --aot output

build success.

Ignoring. WARNING in Invalid property name 'r' at 2265:4. Ignoring.

and the CSS has no values in it.

This works fine on development, is there something I can put in to bypass it and include that line in my output css?