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.

  1. why chrome looking file?
  2. should have included .map file repo?

for further context, wordpress site , am including style.scss file in repo.

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

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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -