From 937eb403b3b2c5c0a03d8bc60dbe2b3a4447b751 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Mon, 13 Sep 2021 19:35:12 +0800 Subject: [PATCH] docs(plugins): clean up webpack 4 related content --- src/content/plugins/ignore-plugin.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/plugins/ignore-plugin.mdx b/src/content/plugins/ignore-plugin.mdx index ec2e88d2a39b..6ef27556e280 100644 --- a/src/content/plugins/ignore-plugin.mdx +++ b/src/content/plugins/ignore-plugin.mdx @@ -8,6 +8,7 @@ contributors: - EugeneHlushko - FadySamirSadek - iamakulov + - chenxsan --- IgnorePlugin prevents the generation of modules for `import` or `require` calls matching the regular expressions or filter functions: @@ -19,14 +20,11 @@ IgnorePlugin prevents the generation of modules for `import` or `require` calls ```javascript new webpack.IgnorePlugin({ resourceRegExp, contextRegExp }); -// Supported in webpack 4 and earlier, unsupported in webpack 5: -new webpack.IgnorePlugin(resourceRegExp, [contextRegExp]); ``` ## Using filter functions - `checkResource (resource, context)` A Filter function that receives `resource` and `context` as arguments, must return boolean. -- `checkContext (context)` was **removed in webpack 5** as `checkResource` already gets context. ```javascript new webpack.IgnorePlugin({