Skip to content

doc: add rsbuild plugin start doc #5455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: use logger from @rsbuild/core
  • Loading branch information
zoolsher committed Jun 20, 2025
commit 64589e7014628ba20cb965ab5b8a60e09151d3d4
10 changes: 10 additions & 0 deletions website/docs/zh/guide/plugin/start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,13 @@ export default {
]
}
```

## 插件的日志打印

默认情况下插件可以直接使用 `console.log` 和 `console.error` 等标准方法进行日志输出。如果你希望打印跟 Rsbuild 主题更接近的 log 可以使用 logger。

```typescript
import { logger } from "@rsbuild/core";

logger.log("hello world");
```
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy