Skip to content

Commit 71e2c5a

Browse files
committed
docs
1 parent 2e3e4dd commit 71e2c5a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

website/docs/en/config/source/entry.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ When you build for multiple [environments](/config/environments), you can set di
9999

100100
For example, set different entry for `web` and `node` environments:
101101

102-
```js
102+
```ts title="rsbuild.config.ts"
103103
export default {
104104
environments: {
105105
web: {
@@ -130,7 +130,7 @@ export default {
130130

131131
If you need to set entry asynchronously, for example, use [glob](https://www.npmjs.com/package/glob) to scan the directory, you can export an async function in `rsbuild.config.ts`:
132132

133-
```ts
133+
```ts title="rsbuild.config.ts"
134134
import path from 'node:path';
135135
import { glob } from 'glob';
136136
import { defineConfig } from '@rsbuild/core';

website/docs/zh/config/source/entry.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default {
9999

100100
比如为 `web``node` 环境设置不同的 entry:
101101

102-
```js
102+
```ts title="rsbuild.config.ts"
103103
export default {
104104
environments: {
105105
web: {
@@ -130,7 +130,7 @@ export default {
130130

131131
如果你需要异步设置 entry,例如使用 [glob](https://www.npmjs.com/package/glob) 来扫描目录,可以在 `rsbuild.config.ts` 中导出一个异步函数:
132132

133-
```ts
133+
```ts title="rsbuild.config.ts"
134134
import path from 'node:path';
135135
import { glob } from 'glob';
136136
import { defineConfig } from '@rsbuild/core';

0 commit comments

Comments
 (0)