css - Should I add the sass source map to my git repo? -
i had added style.css.map
.gitignore
file thinking kind of internal file not needed public consumption.
now i'm seeing when chrome (not firefox) loads page, looking style.css.map
, returning 404. i'm not explicitly asking load file, seems getting called automatically.
- why chrome looking file?
- should have included .map file repo?
for further context, wordpress site , am including style.scss
file in repo.
- using sourcemaps can live edit scss using devtools.
for each generated css file, sass generating source map file (.map file) in addition compiled css. each css file contains annotation specifies url of source map file, embedded in special comment on last line of file:
/*# sourcemappingurl= */
more info sourcemaps: https://developer.chrome.com/devtools/docs/css-preprocessors
- if want use sourcemaps on prod, must have .map file, if don't need it, disable generation. if using grunt run sass, check config.rb file , sass_options entry, might find ":sourcemap => true", if find it, set false. beware sourcemaps default on sass 3.4.
Comments
Post a Comment