ionic3项目打包时遇到的问题
错误信息
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
解决方法
在“/node_modules/@ionic/app-scripts/dist/sass.js”路径的“sass.js”文件,在postcssOptions参数中添加“from: undefined”。添加后效果如下:
var postcssOptions = {
from: undefined, //新添加
to: path_1.basename(sassConfig.outFile),
map: autoPrefixerMapOptions
};
from: undefined, //新添加
to: path_1.basename(sassConfig.outFile),
map: autoPrefixerMapOptions
};