extract-text-webpack-plugin插件 && css文件的抽离

  • 注意事项
  •   		下载时一定要下载extract-text-webpack-plugin@next 
    
		const SetCss = require('extract-text-webpack-plugin) ; 
		module{
		     rules:[
				{
						test : /\.(scss|sass)$/,
						use : SetCss . extract({
										fallback:'style-loader',
										use:['css-loader' , 'sass-loader'] 
								})
					}
			]},
			plugins:[
					new SerCss(index.css)
			]

猜你喜欢

转载自blog.csdn.net/qq_43201542/article/details/87936562