| 
									
										
										
										
											2018-03-26 16:04:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // https://github.com/michael-ciniawsky/postcss-load-config
 | 
					
						
							| 
									
										
										
										
											2018-05-04 17:36:17 +08:00
										 |  |  | const browserslist = require('./package.json').browserslist | 
					
						
							| 
									
										
										
										
											2019-03-08 19:32:20 +08:00
										 |  |  | module.exports = () => { | 
					
						
							|  |  |  |   const plugins = { | 
					
						
							| 
									
										
										
										
											2019-03-08 14:11:06 +08:00
										 |  |  |     'postcss-url': {url: 'inline'}, | 
					
						
							|  |  |  |     'cssnano': { | 
					
						
							|  |  |  |       preset: ['default', { | 
					
						
							|  |  |  |         zindex: false, | 
					
						
							|  |  |  |         mergeIdents: false, | 
					
						
							|  |  |  |         discardUnused: false, | 
					
						
							|  |  |  |         autoprefixer: false, | 
					
						
							|  |  |  |         reduceIdents: false, | 
					
						
							|  |  |  |       }] | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     'autoprefixer': { browsers: browserslist } | 
					
						
							| 
									
										
										
										
											2018-03-26 16:04:04 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2019-03-08 19:32:20 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   if (process.env.NODE_ENV !== 'production' || process.env.BUILD_TYPE === 'example') { | 
					
						
							|  |  |  |     plugins['postcss-pxtorem'] = { rootValue: 100, minPixelValue: 2, propWhiteList: [] } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return { | 
					
						
							|  |  |  |     plugins | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |