webpack 2按字母排序的入口数组

时间:2017-02-09 07:59:49

标签: javascript build webpack frontend webpack-2

如何禁用webpack-2排序条目数组? 我的代码看起来像这样:

   entry: {
     bundle: [./js/helpers/API/stringAPI.js','./js/helpers/API/callbackAPI.js' ] 
   }

但webpack排序数组和我有类似的东西:

 [0] ./js/helpers/API/callbackAPI.js 4.29 kB {0} [built]
 [1] ./js/helpers/API/stringAPI.js 1.03 kB {0} [built]

我可以禁用此类吗?

1 个答案:

答案 0 :(得分:0)

webpack有统计数据选项:https://webpack.js.org/configuration/stats/#stats

试试这个:

stats: {
  assetsSort: false,
  chunksSort: false,
  modulesSort: false
},