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.