Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
How do I add less to my Angular 2 CLI build?

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?

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

When creating a new project you can do ng new project_name --style less.

about 4 years ago · Santiago Trujillo Report

0

For post install, execute

npm install less --save 

Then : - rename all CSS files in your component's directory to less

  • change ['./xxx.component.css'] by ['./xxx.component.less'] in every component file
about 4 years ago · Santiago Trujillo Report

0

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

;)

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!