I use the route to lazily load the size of the packaged file, which always feels strange. Obviously, I haven"t written so much. How can the size of the packaged file be so big? and the size of the packaged file is basically packaged in the order from big to small, that is, the smaller the file is packaged later
.and all the files that are loaded lazily are much larger than those that are not loaded lazily
the following is the code for webpack.mix.js
mix.js("resources/assets/js/app.js", "public/js")
.js("resources/assets/js/index.js", "public/js") // app.js
.extract(["vue", "vue-router", "axios","mint-ui","vue-preview"])
.sass("resources/assets/sass/app.scss", "public/css")
mix.webpackConfig({
output: {
publicPath: "/",
chunkFilename: "js/lazy/[name].[chunkhash].js"
},
resolve: {
alias: {
"vue$": "vue/dist/vue.common.js" // webpack 1 "vue/dist/vue.common.js"
}
},
module: {
rules: [{
test: /vue-preview.src.*?js$/,
loader: "babel"
}]
}
})