测试和包含在Webpack 2中有什么区别?

时间:2017-05-31 08:45:18

标签: webpack-2

文档说:

{ test: Condition }: The Condition must match. The convention is to provide a RegExp or array of RegExps here, but it's not enforced.

{ include: Condition }: The Condition must match. The convention is to provide a string or array of strings here, but it's not enforced.
  1. 差异真的只是一个采用字符串或数组而另一个采用正则表达式或数组吗? 和
  2. 是否包含与Webpack 1相同的工作?

1 个答案:

答案 0 :(得分:0)

经过更多研究后,我想我可以回答我自己的问题:

  1. 在webpack 1中,文档测试用于文件名,include通常用于目录
  2. 看起来像但发行人似乎不存在于Webpack 1