Reputation: 123
I have laravel-vue stack for my project. While building with mix
it splits codes into two main files
vendor.js
app.js
Apart from that there are around 60 files which gets created as chunks like
0.js
1.js
2.js
...
61.js
How to tell webpack to bind these chunks into single file. Does the webpack breaks into chunks for each new component in cue?
Upvotes: 1
Views: 4840
Reputation: 1474
You can modify how many chunks you want in your webpack configuration file (example is from a vue.config.js
file) like this:
module.exports = {
configureWebpack: {
optimization: {
splitChunks: {
minSize: 10000,
maxSize: 250000,
}
}
},
};
I don't know your filesize, but if you increase maxSize
as needed, you can have a single file.
Upvotes: 1