Ionic 2不会生成scss源图。 “main.css.map”包含“null” [英] Ionic 2 doesn’t generate scss source maps. “main.css.map” contains “null”

查看:247
本文介绍了Ionic 2不会生成scss源图。 “main.css.map”包含“null”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

推荐答案

你需要扩展你的sass.config.js文件,默认情况下为sass提供源映射被禁用。

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

config / sass.config.js:

config/sass.config.js:

module.exports = {
  sourceMap: true,
}

package.json :

package.json:

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

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

干杯,

这篇关于Ionic 2不会生成scss源图。 “main.css.map”包含“null”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆