[Vuejs]-Named Chunk build file for VueJS lazy loading routes

0๐Ÿ‘

โœ…

We can achieve this by using below in webpack.config.js-

  output: {
    ....
    chunkFilename: '[name].chunk.js',
    ....
  },

chunkFilename: '[name].chunk.js' generates files with setting.chunk.js and other1.chunk.js and other2.chunk.js etc

chunkFilename: '[id].chunk.js' generates file with 0.chunk.js and 1.chunk.js

Leave a comment