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

こ雲淡風輕ζ 提交于 2019-12-11 00:16:17

问题


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]?

来源:https://stackoverflow.com/questions/44504783/how-to-set-name-of-output-chunkfilename-to-be-the-same-with-name-of-output-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!