Skip to content

Commit 61153d6

Browse files
chenjiahanCopilot
andauthored
docs(quick-start): update runtime installation instructions (#11327)
* docs(quick-start): update runtime installation instructions * Update website/docs/zh/guide/start/quick-start.mdx Co-authored-by: Copilot <[email protected]> * docs: update * docs * docs --------- Co-authored-by: Copilot <[email protected]>
1 parent 9db3594 commit 61153d6

File tree

4 files changed

+26
-76
lines changed

4 files changed

+26
-76
lines changed

website/docs/en/contribute/development/prerequisites.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,4 @@ Rspack is built using [Rust](https://rust-lang.org/) and [NAPI-RS](https://napi.
99

1010
## Setup Node.js
1111

12-
### Install Node.js
13-
14-
We recommend using the LTS version of Node.js 20.
15-
16-
Check the current Node.js version with the following command:
17-
18-
```bash
19-
node -v
20-
```
21-
22-
If you do not have Node.js installed in your current environment, you can use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to install it.
23-
24-
Here is an example of how to install via nvm:
25-
26-
```bash
27-
# Install Node.js LTS
28-
nvm install 20 --lts
29-
30-
# Switch to Node.js LTS
31-
nvm use 20
32-
```
12+
Use the latest Node.js LTS version. For installation instructions, see [Install Node.js](https://nodejs.org/en/download).

website/docs/en/guide/start/quick-start.mdx

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,25 @@ As a low-level bundler, Rspack has a rich ecosystem that includes various framew
1313

1414
See the [Ecosystem](/guide/start/ecosystem) page to explore these ecosystem projects.
1515

16-
## Setup environment
16+
## Environment preparation
1717

18-
Rspack supports using [Node.js](https://nodejs.org/), [Deno](https://deno.com/), or [Bun](https://bun.sh/) as the runtime.
18+
Rspack supports using [Node.js](https://nodejs.org/), [Deno](https://deno.com/), or [Bun](https://bun.sh/) as the JavaScript runtime.
1919

20-
### Node.js
20+
You can refer to the following installation guides and choose one runtime:
2121

22-
For Node.js, please install Node.js >= 16, it is recommended to use the Node.js LTS version.
22+
- [Install Node.js](https://nodejs.org/en/download)
23+
- [Install Bun](https://bun.com/docs/installation)
24+
- [Install Deno](https://docs.deno.com/runtime/getting_started/installation/)
2325

24-
Check the current Node.js version with the following command:
26+
:::tip Version requirements
2527

26-
```bash
27-
node -v
28-
```
29-
30-
If you do not have Node.js installed in current environment, or the installed version is too low, you can use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to install.
28+
Rspack has the following Node.js version requirements:
3129

32-
Here is an example of how to install via nvm:
30+
- `@rspack/cli >= v1.0.0` requires Node.js 18.12.0 or higher.
31+
- `@rspack/core >= v1.5.0` requires Node.js 18.12.0 or higher.
32+
- `@rspack/core < v1.5.0` requires Node.js 16.0.0 or higher.
3333

34-
```bash
35-
# Install Node.js LTS
36-
nvm install --lts
37-
# Switch to Node.js LTS
38-
nvm use --lts
39-
```
34+
:::
4035

4136
## Create a new project
4237

website/docs/zh/contribute/development/prerequisites.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,6 @@ Rspack 使用 [Rust](https://rust-lang.org/) 和 [NAPI-RS](https://napi.rs/) 构
77
- 使用 [rustup](https://rustup.rs/) 安装 Rust。
88
- 如果你在使用 VS Code,我们推荐安装 [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) 扩展。
99

10-
## 设置 Node.js
10+
## 安装 Node.js
1111

12-
### 安装 Node.js
13-
14-
我们建议使用 Node.js 20 的 LTS 版本。
15-
16-
使用以下命令检查当前 Node.js 版本:
17-
18-
```bash
19-
node -v
20-
```
21-
22-
如果你当前环境中没有安装 Node.js,你可以使用 [nvm](https://github.com/nvm-sh/nvm) 或者 [fnm](https://github.com/Schniz/fnm) 来安装它。
23-
24-
这里有一个如何通过 nvm 安装的示例:
25-
26-
```bash
27-
# Install Node.js LTS
28-
nvm install 20 --lts
29-
30-
# Switch to Node.js LTS
31-
nvm use 20
32-
```
12+
使用最新的 Node.js LTS 版本。安装说明请参考 [安装 Node.js](https://nodejs.org/zh-cn/download)

website/docs/zh/guide/start/quick-start.mdx

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,23 @@ import { PackageManagerTabs } from '@theme';
1515

1616
## 环境准备
1717

18-
Rspack 支持使用 [Node.js](https://nodejs.org/)[Deno](https://deno.com/)[Bun](https://bun.sh/) 作为运行时
18+
Rspack 支持使用 [Node.js](https://nodejs.org/)[Deno](https://deno.com/)[Bun](https://bun.sh/) 作为 JavaScript 运行时
1919

20-
### Node.js
20+
你可以参考以下安装指南,选择其中一种运行时:
2121

22-
对于 Node.js,请安装 Node.js >= 16 版本,推荐使用 Node.js LTS 版本。
22+
- [安装 Node.js](https://nodejs.org/zh-cn/download)
23+
- [安装 Bun](https://bun.com/docs/installation)
24+
- [安装 Deno](https://docs.deno.com/runtime/getting_started/installation/)
2325

24-
通过以下命令检查当前使用的 Node.js 版本:
26+
:::tip 版本要求
2527

26-
```bash
27-
node -v
28-
```
29-
30-
如果你的环境中尚未安装 Node.js,或是版本过低,可以通过 [nvm](https://github.com/nvm-sh/nvm)[fnm](https://github.com/Schniz/fnm) 安装。
28+
Rspack 对于 Node.js 的版本要求如下:
3129

32-
下面是通过 nvm 安装的例子:
30+
- `@rspack/cli >= v1.0.0` 要求 Node.js 18.12.0 或更高版本。
31+
- `@rspack/core >= v1.5.0` 要求 Node.js 18.12.0 或更高版本。
32+
- `@rspack/core < v1.5.0` 要求 Node.js 16.0.0 或更高版本。
3333

34-
```bash
35-
# 安装 Node.js LTS
36-
nvm install --lts
37-
# 切换到 Node.js LTS
38-
nvm use --lts
39-
```
34+
:::
4035

4136
## 创建新项目
4237

0 commit comments

Comments
 (0)