Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/content/docs/zh-cn/reference/integrations-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface AstroIntegration {
hooks: {
'astro:config:setup'?: (options: {
config: AstroConfig;
command: 'dev' | 'build' | 'preview';
command: 'dev' | 'build' | 'preview' | 'sync';
isRestart: boolean;
updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig;
addRenderer: (renderer: AstroRenderer) => void;
Expand Down Expand Up @@ -83,7 +83,7 @@ Astro 内置了以下钩子:
```ts
'astro:config:setup'?: (options: {
config: AstroConfig;
command: 'dev' | 'build' | 'preview';
command: 'dev' | 'build' | 'preview' | 'sync';
isRestart: boolean;
updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig;
addRenderer: (renderer: AstroRenderer) => void;
Expand All @@ -105,11 +105,12 @@ Astro 内置了以下钩子:

#### `command` 选项

**类型**:`'dev' | 'build' | 'preview'`
**类型:** `'dev' | 'build' | 'preview' | 'sync'`

- `dev` - 项目执行 `astro dev`
- `build` - 项目执行 `astro build`
- `preview` - 项目执行 `astro preview`
- `sync` - 项目执行 `astro sync`

#### `isRestart` 选项

Expand Down