How to compile sass / scss without creating map files

I went looking for this answer and noticed that it is not yet included in Stack Overflow. Therefore, I hope to share this knowledge with everyone who needs it.

Situation:

At the command line: compilation of compressed SASS files from the scss folder to the css folder.

sass --watch scss:css --style compressed

This creates css files, but also creates .map files.

Question:

So how can I stop creating these .map files?

+7
source share
2 answers

Answer:

Add --sourcemap=noneto your team.

So it will look like this:

sass --watch scss:css --style compressed --sourcemap=none

+18
source

2019 update

Running --sourcemap-noneon the latest version sass(1.21.0) returns Could not find an option named "sourcemap".underCould not find an option named "sourcemap".

--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.

, sass CLI . sass , .

0

Source: https://habr.com/ru/post/1625063/


All Articles