2017-03-01 79 views

回答

7

您需要擴展sass.config.js文件,默認情況下sass的源映射處於禁用狀態。

配置/ 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

乾杯,

+0

嗨。我在另一篇文章中提出了同樣的問題,這個答案解決了這個問題。我已經把你的文章作爲參考答案。謝謝 Here ismy [post](https://stackoverflow.com/questions/43818757/cannot-view-scss-files-while-working-with-ionic-on-dev-tools) – user2049132

+0

它的工作原理!謝謝! – dsinitsyn

+0

也值得注意的是,這段代碼生成的CSS源地圖實際上不會正確映射。但是,我發現在package.json中添加'outputStyle:'compressed',解決了這個問題。 –