Skip to content

Commit 66c1421

Browse files
committed
chore: update
1 parent 78a99f4 commit 66c1421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/docs/zh/guide/basic/configure-rslib.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ rslib build -c rslib.prod.config.mjs
129129

130130
Rslib 提供了三种配置文件加载方式:
131131

132-
- `jiti`:当你使用 `.ts`, `.mts``.cts` Rslib 会使用 [jiti](https://github.com/unjs/jiti) 来加载配置文件,提供 ESM 与 CommonJS 的互操作性,模块解析的行为与 Node.js 原生行为存在一定差异。
132+
- `jiti`:当你使用 `.ts`, `.mts``.cts` 后缀的配置文件时,Rslib 会使用 [jiti](https://github.com/unjs/jiti) 来加载配置文件,提供 ESM 与 CommonJS 的互操作性,模块解析的行为与 Node.js 原生行为存在一定差异。
133133
- `native`:使用 Node.js 原生 loader 来加载配置文件,这可以保证模块解析的行为与 Node.js 原生行为一致,并且性能更好。这要求你使用的 JavaScript 运行时已经原生支持 TypeScript。
134134

135135
例如,Node.js 从 v22.6.0 开始已经原生支持 TypeScript,你可以运行如下命令来使用 Node.js 原生 loader 来加载配置文件:

0 commit comments

Comments
 (0)