Style configurations in environment.ts

5 views
Skip to first unread message

Arash M

unread,
Jul 5, 2019, 9:23:37 AM7/5/19
to Angular and AngularJS discussion
I have included global styles in angular.json.


"styles": ["src/styles.css",
           
"node_modules/bootstrap/dist/css/bootstrap.min.css"],
        



Now I would like to be able to overwrite the "style" property inside the environment.ts file so, for each environment I include certain styles. Is this possible and how to do that? 
In fact I want to remove the Bootstrap global style in production mode.

Sander Elias

unread,
Jul 9, 2019, 1:27:02 AM7/9/19
to Angular and AngularJS discussion
Hi Arash,

No, you can't modify this during build-time and neither during runtime.
However, you can load styles on demand, so perhaps load the bootstrap thing only when not in production on demand?

Regards
Sander
Reply all
Reply to author
Forward
0 new messages