I have created a project with the Angular CLI and I would like to add less files to the build. I want a main less for shared and global styles and a less file in with the components for local styles. How can I add a compile less files step to the build process?
When creating a new project you can do ng new project_name --style less.
For post install, execute
npm install less --save
Then : - rename all CSS files in your component's directory to less
When generating a new project you can also define which extension you want for style files:
ng new less-project --style=less
Or set the default style on an existing project:
ng set defaults.styleExt less
;)