Why vue 3 import all js files for all pages on first load project

Solution 1:

You should disable preloading/prefetching in vue.config.js:

module.exports =
{
  chainWebpack: config =>
  {
    config.plugins.delete('prefetch'); // for async routes
    config.plugins.delete('preload'); // for CSS
    return config;
  }
};