Ionic 2不会生成scss源图."main.css.map"包含"null"

dsi*_*syn 6 sass source-maps webpack ionic2

你能帮助我理解为什么Ionic 2不会生成scss源地图.在"离子服务"后我导航到www/build文件夹,有main.css.map,但它包含null而不是生成的源图,如何解决?有谁遇到过这个问题?

Jua*_*dez 7

您需要扩展sass.config.js文件,默认情况下,sass的源映射已禁用.

配置/ sass.config.js:

module.exports = {
  sourceMap: true,
}
Run Code Online (Sandbox Code Playgroud)

的package.json:

"config": {
  "ionic_sass": "./config/sass.config.js",
},
Run Code Online (Sandbox Code Playgroud)

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

干杯,