Ionic 2 doesn’t generate scss source maps. “main.css.map” contains “null”
Asked Answered
G

1

6

Could you help me to understand why Ionic 2 doesn't generate scss source maps. After "ionic serve" I'm navigating to www/build folder, there is main.css.map but it contains null instead of generated sourcemaps, how to fix it? Anyone faced this problem?

Gamber answered 1/3, 2017 at 14:54 Comment(0)
Q
7

You'll need to extend your sass.config.js file, by default source mapping for sass is disabled.

config/sass.config.js:

module.exports = {
  sourceMap: true,
}

package.json:

"config": {
  "ionic_sass": "./config/sass.config.js",
},

https://github.com/GerritErpenstein/ionic2-custom-icons/blob/master/docs/CONFIGURATION.md

Cheers,

Quadriplegia answered 12/6, 2017 at 19:11 Comment(2)
Hi. I had asked the same question on another post and this answer solves the problem. I have put your post as reference on the answer. Thanks Here ismy postEigenvalue
It's also worth noting that the CSS sourcemaps generated by this code won't actually map correctly. However, I found that adding outputStyle: 'compressed', to the package.json solves this problem.Kohn

© 2022 - 2024 — McMap. All rights reserved.