count) { // A module is extracted into the vendor chunk when... return ( // If it's inside node_modules /node_modules/.test(module.context) && // Do not externalize if the request is a CSS file or a Vue file which can potentially emit CSS assets! !/\.(css|less|scss|sass|styl|stylus|vue)$/.test(module.request) ) } }) node_modules/nuxt/lib/builder/webpackclient.config.js webpack3のCode splittingはCommonChunkPluginが使われている。 1. Nuxt v1のファイルサイズ問題
Small, known and common modules which are usually used project-wise // Sum of them may not be more than 244 KiB if ( this.options.build.splitChunks.commons === true && optimization.splitChunks.cacheGroups.commons === undefined ) { optimization.splitChunks.cacheGroups.commons = { test: /node_modules[\\/](vue|vue-loader|vue-router|vuex|vue-meta|core-js|@babel\/runtime|axios|webpack|setimmedia te|timers-browserify|process|regenerator-runtime|cookie|js-cookie|is-buffer|dotprop|nuxt\.js)[\\/]/, chunks: 'all', priority: 10, name: true }; } return optimization } 2. Nuxt2でどのように解消されたか