the package printed when using webpack is too large. After analysis with webpack visualizer tool, it is found that this package contains babel-loader, vue-loader and other development dependent packages. The following code is the configuration in webpack.prod.conf.js:
vue: {
root: "Vue",
commonjs: "vue",
commonjs2: "vue",
amd: "vue"
},
"vue-router": {
root: "vue-router",
commonjs: "vue-router",
commonjs2: "vue-router",
amd: "vue-router"
},
"vue-i18n": {
root: "vue-i18n",
commonjs: "vue-i18n",
commonjs2: "vue-i18n",
amd: "vue-i18n"
},
iview: {
root: "iview",
commonjs: "iview",
commonjs2: "iview",
amd: "iview"
},
"babel-loader": {
root: "babel-loader",
commonjs: "babel-loader",
commonjs2: "babel-loader",
amd: "babel-loader"
}
iview, vue, vue-router and vue-i18n are all gone in the final compiled package, but is there any way for babel-loader, to get babel-loader removed, too?