{
"name": "vue-pro",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --config webpack.config.dev.js --open",
"build": "webpack --progress -p"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.11",
"html-webpack-plugin": "^3.2.0",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"vue-loader": "^14.2.2",
"vue-template-compiler": "^2.5.16",
"webpack": "^3.11.0",
"webpack-dev-server": "^2.11.2"
},
"dependencies": {
"babel-runtime": "^6.26.0",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"vue": "^2.5.16",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
}
}
"dev": "webpack-dev-server --config webpack.config.dev.js --open --port 9090 --host 10.36.136.170 --progress",//显示进度条
https://www.jianshu.com/p/1a775dcfe957 插件文章
https://cloud.tencent.com/developer/article/1356611
plugin
- define-plugin:定义环境变量
- commons-chunk-plugin:提取node包中引入的代码
- uglifyjs-webpack-plugin:通过UglifyES压缩ES6代码
- html-webpack-plugin 为html文件中引入的外部资源,可以生成创建html入口文件
- clean-webpack-plugin:删除打包文件
- happypack:实现多线程加速编译
- extract-text-webpack-plugin 吧css从js中提取出来
- optimize-css-assets-webpack-plugin 优化压缩css
- imagemin-webapack-plugin 图片压缩
- copy-webpack-plugin 静态文件拷贝到dist文件夹