如果没有`from`选项,PostCSS可能会生成错误的源映射或找不到Browserslist配置 [英] Without `from` option PostCSS could generate wrong source map or do not find Browserslist config
问题描述
Witout
来自
选项PostCSS可能会生成错误的源地图,或者没有
找到浏览器列表配置。将其设置为CSS文件路径或未定义
到
防止此警告
Witout
from
option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or toundefined
to prevent this warning
ionic3项目,当我运行 ionic corodva bulid ios --prod
向我显示此警告。
ionic3 project, when I running ionic corodva bulid ios --prod
showing this warning for me.
离子信息
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.7
Cordova Platforms : android 6.3.0 ios 4.4.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v6.11.3
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
更新:
我试图将我的npm更新为5.5.1,将节点更新为8.6。 0,但仍显示。
I tried to update my npm to 5.5.1 and node to 8.6.0, but still showing.
推荐答案
最后,此警告已解决。感谢 Suraj Rao
Finally, this warning solved. Thanks to Suraj Rao
首先找到 sass.js
/node_modules/@ionic/app-scripts/dist/sass.js。
内搜索 var postcssOptions
并添加来自:undefined,
最后应该是这样的:
var postcssOptions = {
from: undefined,
to: path_1.basename(sassConfig.outFile),
map: autoPrefixerMapOptions
};
参考: workaround 。
这篇关于如果没有`from`选项,PostCSS可能会生成错误的源映射或找不到Browserslist配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!