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

175
Views
SCSS and Express JS

How can I set up Express to use style.scss file instead of style.sass ?

It only recognizes style.sass with the following configuration.

app.js

// Sass setup
app.use(require('node-sass-middleware')({
  src: path.join(__dirname, 'public/sass'),
  dest: path.join(__dirname, 'public/css'),
  indentedSyntax: true,
  sourceMap: true,
  outputStyle: 'compressed'
})); 

Structure tree

-public 

--stylesheets 

---style.css
---style.css.map
---style.sass

I would like to use style.scss instead of style.sass.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you want to use scss files, you can remove the key/value intentedSyntax. This option allows you to use scss files

app.use(require('node-sass-middleware')({
  src: path.join(__dirname, 'public/sass'),
  dest: path.join(__dirname, 'public/css'),
  sourceMap: true,
  outputStyle: 'compressed'
})); 

However, say if you used indentedSyntax but wanted to use the file extension scss - then you'll have to make a decision.

  1. use indentedSyntax (and keep .sass)
  2. use .scss and ensure you have brackets in your scss files.

If you're using sass 3.x then you can use the above proposed solution.

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!