From e41637d16c1ef3c449ee3ca6bd45131af653ac70 Mon Sep 17 00:00:00 2001 From: andylizi Date: Mon, 6 Sep 2021 19:19:20 +0800 Subject: [PATCH] docs: apply review suggestions --- docs/guide/api-plugin.md | 1 + docs/guide/using-plugins.md | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index a8638d307afc4d..0a4696595430af 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -418,6 +418,7 @@ A function can also be used for more precise control: ```js apply(config, { command }) { + // apply only on build but not for SSR return command === 'build' && !config.build.ssr } ``` diff --git a/docs/guide/using-plugins.md b/docs/guide/using-plugins.md index 875be13646f1f0..ca4faf9d501718 100644 --- a/docs/guide/using-plugins.md +++ b/docs/guide/using-plugins.md @@ -82,14 +82,6 @@ export default defineConfig({ }) ``` -A function can also be used for more precise control: - -```js -apply(config, { command }) { - return command === 'build' && !config.build.ssr -} -``` - ## Building Plugins Check out the [Plugins API Guide](./api-plugin.md) for documentation about creating plugins.