text: const path = require('path');
  
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const VueLoaderPlugin = require('vue-loader/lib/plugin')
  module.exports = {
  	entry: path.join(__dirname, './src/main.js'),
  	output: {
  		path: path.join(__dirname, './dist'),
  		filename: 'bundle.js'
  	},
  	devServer: {
  		open: true, //自动打开浏览器
  		port: 3000, //端口设置
  		// contentBase: 'src', //指定托管的根目录 告诉服务器从哪里提供内容。只有在你想要提供静态文件时才需要
  		hot: true
  	},
  	plugins: [ //配置插件节点
  		new HtmlWebpackPlugin({
  			template: path.join(__dirname, './src/index.html'),
  			filename: 'index.html'
  		}),
  		new VueLoaderPlugin(),
  
  	],
  	module: { //配置第三方模块加载器
  		rules: [ //匹配规则
  			{
  				test: /\.(html)$/,
  				use: 'html-withimg-loader'
  			},
  			{ //匹配处理.css文件的第三方loader规则
  				test: /\.css$/,
  				use: [{
  						loader: "style-loader"
  					},
  					{
  						loader: "css-loader"
  					}
  				]
  			},
  			{
  				test: /\.less$/,
  				use: [{
  					loader: "style-loader" // creates style nodes from JS strings
  				}, {
  					loader: "css-loader" // translates CSS into CommonJS
  				}, {
  					loader: "less-loader" // compiles Less to CSS
  				}]
  			},
  			{
  				test: /\.scss$/,
  				use: [{
  					loader: "style-loader" // 将 JS 字符串生成为 style 节点
  				}, {
  					loader: "css-loader" // 将 CSS 转化成 CommonJS 模块
  				}, {
  					loader: "sass-loader" // 将 Sass 编译成 CSS
  				}]
  			},
  			// {
  			// 	test: /\.(png|jpg|gif|jpeg)$/,
  			// 	use:'file-loader'
  			// },
  			{
  				test: /\.(png|jpg|gif)$/,
  				use: [{
  					loader: 'url-loader',
  					options: {
  						limit: 8192
  					}
  				}]
  			},
  			{ // 处理 字体文件的 loader
  				test: /\.(ttf|eot|svg|woff|woff2)$/,
  				use: 'url-loader'
  			},
  			{
  				test: /\.js$/,
  				exclude: /(node_modules|bower_components)/,
  				use:'babel-loader'
  				
  			},
  			{
  				test: /\.vue$/,
  				loader: 'vue-loader'
  			}
  		]
  	},
  	resolve: {
  		alias: {
  			// 'vue$': 'vue/dist/vue.esm.js'
  		}
  	},
  
  
  }
  