Upgrade webpack to version v4.x (#6655)
This commit is contained in:
		
							parent
							
								
									e709107463
								
							
						
					
					
						commit
						e9b322d0a6
					
				
					 15 changed files with 2716 additions and 1744 deletions
				
			
		|  | @ -1,15 +1,22 @@ | |||
| const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||||
| const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||||
| const { env } = require('../configuration.js'); | ||||
| 
 | ||||
| module.exports = { | ||||
|   test: /\.(scss|sass|css)$/i, | ||||
|   use: ExtractTextPlugin.extract({ | ||||
|     fallback: 'style-loader', | ||||
|     use: [ | ||||
|       { loader: 'css-loader', options: { minimize: env.NODE_ENV === 'production' } }, | ||||
|       { loader: 'postcss-loader', options: { sourceMap: true } }, | ||||
|       'resolve-url-loader', | ||||
|       'sass-loader', | ||||
|     ], | ||||
|   }), | ||||
|   test: /\.s?css$/i, | ||||
|   use: [ | ||||
|     MiniCssExtractPlugin.loader, | ||||
|     { | ||||
|       loader: 'css-loader', | ||||
|       options: { | ||||
|         minimize: env.NODE_ENV === 'production', | ||||
|       }, | ||||
|     }, | ||||
|     { | ||||
|       loader: 'postcss-loader', | ||||
|       options: { | ||||
|         sourceMap: true, | ||||
|       }, | ||||
|     }, | ||||
|     'sass-loader', | ||||
|   ], | ||||
| }; | ||||
|  |  | |||
		Reference in a new issue