let htmlWebpckPlugin= require('html-webpack-plugin');//该组件能将src下面提定的html文件与打包后在js文件打包在一起
module.exports={
mode:'development',
entry:'./src/main.js', //入口文件
output:{
filename:"bundle.js", //出口文件名
path:__dirname+"/dist" //出口文件目录
},
module:{
rules:[
{test:/\.js$/,use:"babel-loader",exclude:/node_modules/},
{test:/\.css$/,use:['style-loader','css-loader']},
{test:/\.less$/,use:'less-loader'},
{test:/\.(jpg|png|gif|jpeg|)$/,use:"url-loader?limit=8192"},
{test:/\.(woff|woff2|eot|ttf|svg)$/,use:'url-loader'},
{test:/\.vue$/,use:"vue-loader"}
]
},
plugins:[
new htmlWebpckPlugin({
template:"./src/index.html",
//filename:"" 设置生成在dist下面的html文件名称
})
],
devServer: { //给webpack-dev-server配置默认的环境
host:"127.0.0.1",
port:8088
},
};

最新文章

  1. quick sort 的简化实现
  2. error-2015-9-9
  3. Linux下的网络远程安装
  4. css+div绝对定位
  5. IIS URL Rewrite redirect from one Domain to another
  6. sql语句中的 inner join 、 left join 、 right join、 full join 的区别
  7. yii中modules的命名规则
  8. 求n个数中的最大或最小k个数
  9. OC9_字符串的内存管理
  10. PHP中的循环while、do...while、for、foreach四种循环。
  11. 获取系统的IP
  12. 框架的设计之IRepository还是IRepository<T>
  13. PE文件格式详解,第一讲,DOS头文件格式
  14. 如何让模拟的json数据接口能够正常的在手机上有效果
  15. 近年NOIP考点与主要做法
  16. vue项目中 如何让外部引入的js模块 的this值 指向vue实例
  17. 【LeetCode每天一题】Trapping Rain Water(获得雨水的容量)
  18. 如何在CentOS7上安装Python3及对应问题
  19. 【redis的链接】redis的两种连接方法
  20. vue 侧边导航栏递归显示

热门文章

  1. BizMDM企业主数据管理平台
  2. C#对bat脚本文件的操作示例
  3. 小程序里打开app的实现过程
  4. ubuntu16.04安装中文输入法(转)
  5. 我的visual studio 配色方案 Rubik c++版
  6. pat甲级1085
  7. jmter安装配置
  8. 解决Gearman 报sqlite3错误
  9. centos 7jenkin+git 安装
  10. 2018.8.2 Juint测试介绍及其命名的规范