Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt: SASS creates unwanted .map file

I've got grunt to successfully compile SASS to CSS. The problem I'm having is it's creating a file within the CSS directory called something like master.css.map.

I tried writing sourceMap: false, which I found as being the solution for a LESS setup within the options section, whereas it doesn't make a difference.

sass: {
  build: {
    options: {
      compress: false,
      sourceMap: false
    },
    files: [{
      expand: true,
      cwd: 'sass/',
      src: ['*.scss'],
      dest: 'css/',
      ext: '.css'
    }]
  }
}

Do I need to declare something else or is there a dependency that can stop the .map file from being made?

like image 869
Joshua Waheed Avatar asked Feb 13 '23 00:02

Joshua Waheed


1 Answers

You need to write like this:

options: {
    compress: false,
    sourcemap: 'none'
  }

Here's a link for further clarification.

Hope this helps.

like image 166
Rishabh Shah Avatar answered Feb 24 '23 19:02

Rishabh Shah