Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

How/where to add additional style files? #1182

Closed
kemmis opened this issue Aug 11, 2017 · 2 comments
Closed

How/where to add additional style files? #1182

kemmis opened this issue Aug 11, 2017 · 2 comments

Comments

@kemmis
Copy link

kemmis commented Aug 11, 2017

I have my webpack.config.js setup to use less-loader and it is loading my component's less files just fine. However I have an additional base-theme.less file in my app folder that I want to include so it is applied globally. What is the appropriate way to include this additional less file in my main (non-vendor) webpack?

@SteveSandersonMS
Copy link
Member

It should be enough just to put import 'path/to/your/file.less'; in your boot file (e.g., for Angular, that's boot.browser.ts or boot-client.ts).

@kemmis
Copy link
Author

kemmis commented Aug 14, 2017

Thanks for the reply @SteveSandersonMS. I ended up putting everything in my app.component.less file next to the aspp.component.ts, and then setting encapsulation: ViewEncapsulation.None in the @component() decorator.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants