[Vuejs]-Vue.js can't divide code into loadable small chunks

0👍

Webpack has an optimization
Webpzck optimization

Here is en example:

optimization: {
  splitChunks: {
    cacheGroups: {
      commons: {
        test: /[\\/]node_modules[\\/]/,
        minSize: 10000,
        maxSize: 250000,
      }
    }
  }
}

If you have a test folder, you should set

test: /[\\/]node_modules[\\/]/,

or your tests can’t bundle and run.

Leave a comment