I would like to know how I can prevent Sass from writing .map
files. I'm using Sass in a very basic setup:
sass --watch style.scss:style.css
what parameters do I have to add to avoid Sass to generate map files?
I would like to know how I can prevent Sass from writing .map
files. I'm using Sass in a very basic setup:
sass --watch style.scss:style.css
what parameters do I have to add to avoid Sass to generate map files?
That depends on the implementation.
For node-sass and ruby-sass try this:
sass --sourcemap=none --watch style.scss:style.css
If you're using dart-sass the usage is --no-source-map
:
sass --no-source-map --watch style.scss:style.css
environment.rb
and it's hidden deeply in sass installation folder. Right now I'm trying to figure out how to modify this configuration, though I'm not very familiar with Ruby language. I'll update my answer when I'll success. –
Professional :sourcemap
option doesn't work. I tried to test it together with another one (options[:style] = :compressed
) which worked fine. I'm not very familiar with Ruby, so I couldn't figure out where there problem is... I guess, the best solution for now would be to switch to Compass. It's a framework on top of Sass and beside some really nice mixins, it has a global configuration file. –
Professional Invalid argument for -m flag: 'none'. Allowed arguments are: auto inline
. –
Yugoslavia it's works:
sass --watch --no-source-map input.scss output.css
with
1.8.0 compiled with dart2js 2.0.0-dev.66.0
I'm using sass version 1.13.2 compiled with dart2js 2.0.0
on Ubuntu
and it's sass --no-source-map --watch [source].scss:[target].css
as --source-map
enables source map and --no-source-map
disables it.
sass --no-source-map --watch [source].scss:[target].css
–
Resinous Works:
sass --sourcemap=none style.scss style.css
Doesn't work, still generate .map file:
sass --update --sourcemap=none style.scss:style.css
So make sure you have no --update
flag
sass --update --force --sourcemap=none style.scss:style.css
. --force flag will force compilation even if destination css is newer than scss –
Pinch It's now 2023, and the answers here led me to disabling the sourcemaps via PHPStorm 2020.1 and using its File Watchers facility (file/settings/tools/file watchers).
In the Arguments text box, I used the following, and the sourcemaps are now history.
--no-source-map $FileName$:../css/$FileNameWithoutExtension$.css
I hope this may help someone who, like me, was trawling the web for a couple of days for the solution.
As default, the sourcemap is enabled for Dart Sass and if you add --no-source-map
it will disable it.
© 2022 - 2024 — McMap. All rights reserved.
.map
files? – Endmost