I went looking for this answer and noticed it is not yet on Stack Overflow. So I hope to share this knowledge for anyone in need.
Situation:
In the command line: compiling compressed SASS files from the scss folder into the css folder.
sass --watch scss:css --style compressed
This creates css files, but it also creates .map files as well.
Question:
So how do I stop these .map files from being created?
scss is compiled into CSS when you save your project manually or automatically and how the changes to _grid. scss are reflected in the generated CSS file.
When you write Sass code in a . scss file, it is compiled into a regular CSS file that the browser will use to display it on the web page.
SASS is used when we need an original syntax, code syntax is not required for SCSS.
Update for 2019
Running --sourcemap-none
on the latest version of sass
(1.21.0) returns Could not find an option named "sourcemap".
The new flag is --no-source-map
.
━━━ Source Maps ━━━━━━━━━━━━━━━━━━━━━━━━
--[no-]source-map Whether to generate source maps.
(defaults to on)
--source-map-urls How to link from source maps to source files.
[relative (default), absolute]
--[no-]embed-sources Embed source file contents in source maps.
--[no-]embed-source-map Embed source map contents in CSS.
Also, sass is one of the many CLI programs with built-in help output. Running sass
without any arguments shows usage instruction and various flags, like this one.
Update, now the proper command to avoid creating a map file is:
--no-source-map
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With