Angular.json styles "inject" is not a valid property

1k views Asked by At

I'm trying to add some custom styles to angular.json > "projects" > "app-name" > "architect" > "build" > "options" > "styles" but when I add my style object, the Property inject is not allowed.

{
   "input": "src/assets/theme/client-a-style.css",
   "bundleName": "client-a",
   "inject": true
}

I'm using Angular v6.0.8

2

There are 2 answers

0
Darrow Hartman On

I don't think that "bundleName" is a parameter of the styles array, remove the styles and just keep "input" and "inject". Let me know if that works.

0
Guillermo Calleja Herrero On

In versions < v11 you must use lazy:true

enter image description here

https://github.com/angular/angular-cli/issues/19504

Regards