Without the `from` option, PostCSS may generate an invalid source map or not find browser configurations

The Witout from PostCSS option may generate an invalid source map or fail to find browser configurations. Set it to a CSS file path or undefined to prevent this warning

ionic3 when I run ionic corodva bulid ios --prod showing this warning for me.

ion information

 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 

UPDATE:

I tried updating my npm to 5.5.1 and node to 8.6.0, but still showing.

+5
source share
1 answer

Finally, this warning has been resolved. Thanks Suraj Rao

First find the sass.js file in /node_modules/@ionic/app-scripts/dist/sass.js. inside the search var postcssOptions and add from: undefined,

Finally, it should be like this:

 var postcssOptions = { from: undefined, to: path_1.basename(sassConfig.outFile), map: autoPrefixerMapOptions }; 

Link: workaround .

+12
source

Source: https://habr.com/ru/post/1274588/


All Articles