How to use the NamedChunksPlugin function from webpack

Find comprehensive JavaScript webpack.NamedChunksPlugin code examples handpicked from public code repositorys.

96
97
98
99
100
101
102
103
104
105
new ScriptExtHtmlWebpackPlugin({
  // `runtime` must same as runtimeChunk name. default is `runtime`
  inline: /runtime\..*\.js$/,
}),
// keep chunk.id stable when chunk has no name
new webpack.NamedChunksPlugin((chunk) => {
  if (chunk.name) {
    return chunk.name;
  }
  const modules = Array.from(chunk.modulesIterable);
fork icon0
star icon0
watch icon0

+ 2 other calls in file

69
70
71
72
73
74
75
76
77
78
new ScriptExtHtmlWebpackPlugin({
  //`runtime` must same as runtimeChunk name. default is `runtime`
  inline: /runtime\..*\.js$/
}),
// keep chunk.id stable when chunk has no name
new webpack.NamedChunksPlugin(chunk => {
  if (chunk.name) {
    return chunk.name
  }
  const modules = Array.from(chunk.modulesIterable)
fork icon0
star icon0
watch icon0