How to set [name] of output.chunkFilename to be the same with [name] of output.filename?

时间:2017-06-12 16:53:10

标签: webpack webpack-2

In webpack 2 I defined output like this:

  module.exports.output = {
    filename: `js/[name].js`,
    chunkFilename: `js/[id].[name].js`,
  }

When devServer starts, entry file is main.js as expected. However, the chunk file is requested as 0.0.js, what should I do if I want 0.main.js? Also I'm curious why can't chunkFilename's [name] be in accord with filename's [name]?

0 个答案:

没有答案