vue-cli打包问题

"dependencies": {

"axios": "^0.17.1",
"css-loader": "^0.28.9",
"echarts": "^3.8.5",
"html2canvas": "^1.0.0-alpha.9",
"iview": "^2.7.4",
"jspdf": "^1.3.5",
"less": "^2.7.3",
"less-loader": "^4.0.5",
"style-loader": "^0.20.1",
"vue": "^2.5.2",
"vue-resource": "^1.3.4",
"vue-router": "^3.0.1",
"vuex": "^2.5.0"

},


上面的文件最后打包会生成 vendor.js 吗? 哪些是可以注释掉不用呢 ?
我最后打包的vendor.js太大了

阅读 2k
1 个回答
"axios": "^0.17.1", // 这个和vue-resoure冲突 把vue-resoure uninstall
"css-loader": "^0.28.9", // 这个是webpack插件,css加载编译器 放到devDependencies(开发环境)里,
"echarts": "^3.8.5",
"html2canvas": "^1.0.0-alpha.9",
"iview": "^2.7.4",
"jspdf": "^1.3.5",
"less": "^2.7.3", // less是预编译器,devDependencies里
"less-loader": "^4.0.5", // 同css-loader
"style-loader": "^0.20.1", // 同css-loader
"vue": "^2.5.2",
"vue-resource": "^1.3.4", // uninstall 建议用axios 这个不维护了已经
"vue-router": "^3.0.1",
"vuex": "^2.5.0"

建议从头看下webpack

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进