From 55b3ca85262261652ab6ae8d39820cb409176dee Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Mon, 25 Sep 2017 17:24:57 +0100 Subject: [PATCH] Improve documentation for plugin configuration Adds examples for deleting plugins (to make it clearer that the `.delete()` must be applied to the backing set and not using the shorthand form), and corrects some typos. --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b25a301..0035340 100644 --- a/README.md +++ b/README.md @@ -600,10 +600,16 @@ config .init((Plugin, args) => new Plugin(...args)); ``` +#### Config plugins: removing + +```js +config.plugins.delete(name) +``` + #### Config resolve plugins ```js -// Backed at config.plugins +// Backed at config.resolve.plugins config.resolve.plugin(name) : ChainedMap ``` @@ -617,7 +623,7 @@ config.resolve .use(WebpackPlugin, args) ``` -#### Config plugins: modify arguments +#### Config resolve plugins: modify arguments ```js config.resolve @@ -625,7 +631,7 @@ config.resolve .tap(args => newArgs) ``` -#### Config plugins: modify instantiation +#### Config resolve plugins: modify instantiation ```js config.resolve @@ -633,6 +639,12 @@ config.resolve .init((Plugin, args) => new Plugin(...args)) ``` +#### Config resolve plugins: removing + +```js +config.resolve.plugins.delete(name) +``` + #### Config node ```js