ContextExclusionPlugin

上下文指一个带有表达式的 require,例如 require('./locale/' + name + '.json')

ContextExclusionPlugin 允许你排除上下文。在初始化插件时,提供 RegExp 作为参数,以排除所有匹配的上下文。

webpack.config.js

module.exports = {
  plugins: [new webpack.ContextExclusionPlugin(/dont/)],
};

1 贡献者

jeffin