Hi,
Trying to deploy our Vue application we have noticed that our Vendor chunk is very big - and a large portion of it seems to be Kendo related. Even if we split our vendor file using the code below we create a giant progress file (3.5GB) that needs to be downloaded - and when we uncomment the console.log section - it seems that kendo-ui is the largest portion of the file - and it includes a lot of components (like spreadsheet, for example) that we do not need.
Do you have any suggestions how we limit the kendo components that are distributed when we do 'npm run build' - to just the ones we use?
--
configureWebpack: config => {
config.optimization = {
splitChunks: {
chunks: 'all',
maxInitialRequests: Infinity,
minSize: 0,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name (module) {
//get the name. E.g. node_modules/packageName/not/this/part.js
//or node_modules/packageName
let packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
//console.log(module.context + ' >>> ' + packageName);
//npm package names are URL-safe, but some servers don't like @ symbols
return `npm.${packageName.replace('@', '')}`;
}
}
}
}
};
--
If we add a second line to break progress with:
if (packageName === '@progress') {
packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)(.*?)([\\/]|$)/)[3];
}
we see that kendo-ui is still gigantic (3.3GB) and contains stuff we do not use, for example spreadsheet, dataviz:
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\spreadsheet >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\util >>> kendo-ui
:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\dataviz\stock >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js\dataviz\stock >>> kendo-ui
D:\finanda\myfinanda-web\node_modules\@progress\kendo-ui\js >>> kendo-ui