You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/en/guide/solution/nodejs.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Rslib offers seamless support for Node.js projects, allowing you to build Node.j
25
25
26
26
For example, in `rslib.config.ts`:
27
27
28
-
```ts
28
+
```ts title="rslib.config.ts"
29
29
import { defineConfig } from'@rslib/core';
30
30
31
31
exportdefaultdefineConfig({
@@ -62,9 +62,9 @@ All Node.js [built-in modules](https://nodejs.org/docs/latest/api/) are external
62
62
63
63
### Shims
64
64
65
-
-`global`: leave it as it is, while it's recommended to use[globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) instead.
66
-
-`__filename`: When outputting in ESM format, replace`__filename` with the result of`fileURLToPath(import.meta.url)`.
67
-
-`__dirname`: When outputting in ESM format, replace`__dirname` with the result of`dirname(fileURLToPath(import.meta.url))`.
65
+
-`global`: leave it as it is, while it's recommended to use[globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) instead.
66
+
-`__filename`: When outputting in ESM format, replace`__filename` with the result of`fileURLToPath(import.meta.url)`.
67
+
-`__dirname`: When outputting in ESM format, replace`__dirname` with the result of`dirname(fileURLToPath(import.meta.url))`.
68
68
69
69
{/* TODO: Rspack doesn't support createRequire now */}
Copy file name to clipboardExpand all lines: website/docs/en/guide/start/quick-start.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
3
3
## Setup environment
4
4
5
-
Before getting started, you will need to install [Node.js](https://nodejs.org/) >= version 16. We recommend using the Node.js LTS version.
5
+
Before getting started, you will need to install [Node.js](https://nodejs.org/) >= version 16, it is recommended to use the Node.js LTS version.
6
6
7
7
Check the current Node.js version with the following command:
8
8
9
9
```bash
10
10
node -v
11
11
```
12
12
13
-
If you do not have Node.js installed in your 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.
13
+
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.
14
14
15
15
Here is an example of how to install via nvm:
16
16
@@ -81,7 +81,7 @@ We're working to provide templates for more frameworks (such as Vue).
81
81
```
82
82
83
83
:::tip
84
-
Biome provides combined linting and formatting features. If you select Biome, you typically won't need ESLint or Prettier.
84
+
Biome provides similar linting and formatting features to ESLint and Prettier. If you select Biome, you typically won't need to choose ESLint or Prettier as well.
85
85
:::
86
86
87
87
### Current directory
@@ -100,7 +100,7 @@ If you need to create a project in the current directory, you can set the target
100
100
101
101
### Quick creation
102
102
103
-
[create-rslib](https://www.npmjs.com/package/create-rslib) provides command-line options / flags. By setting these CLI flags, you can skip the interactive selection steps and create the project with one command.
103
+
[create-rslib](https://www.npmjs.com/package/create-rslib) provides some CLI flags. By setting these CLI flags, you can skip the interactive selection steps and create the project with one command.
104
104
105
105
For example, to create an example project in the `my-project` directory with one command:
106
106
@@ -111,7 +111,7 @@ npx create-rslib --dir my-project --template example
111
111
npx create-rslib -d my-project -t example
112
112
```
113
113
114
-
Current flags for`create-rslib`:
114
+
All the CLI flags of`create-rslib`:
115
115
116
116
```text
117
117
Usage: create-rslib [options]
@@ -136,7 +136,7 @@ To migrate from an existing project to Rslib, refer to the following guides:
136
136
137
137
For other types of projects, you can manually install the [@rslib/core](https://www.npmjs.com/package/@rslib/core) package:
0 commit comments