ContextExclusionPlugin 插件
webpackjsorg-main插件参考
ContextExclusionPlugin 插件
Context(上下文)指的是 import() 或 require() 中的动态表达式,例如 require('./locale/' + name + '.json')。
ContextExclusionPlugin 允许你排除 context。在初始化插件时提供一个 RegExp 作为参数,以排除所有与之匹配的 context。
webpack.config.js
js
export default {
plugins: [new webpack.ContextExclusionPlugin(/dont/)],
};
帮助我们改进文档
发现翻译问题或内容错误?请告诉我们。
