Hi,
How to reuse styles written in LESS files In Angular 2 app with Webpack?
I want to have a common.less file that contains the styles/style variables common for all the components. (example: some theme related variables)
Then, I want to import this common.less file in each of the component style's file, so that I don't have to rewrite these common styles/style variables there.
I am a Webpack user. When I tried this, I get the contents from common.less file getting copied in all component style files, which is bad.
Need help in doing this properly. Appreciate your help on advance.
Grey Davis
Frontend and other stuff
If you're using
lessyou can just do a@import "common.less";into any other less file and it would just work