Skip to content

Commit b38e48b

Browse files
authored
docs: correct syntax and redirect examples (#480)
1 parent 7ffd34e commit b38e48b

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

website/docs/en/config/lib/redirect.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ If you don't need these redirects, you can turn it off, and its import path will
3131
```ts title="rslib.config.ts"
3232
export default {
3333
lib: [
34-
// ..
34+
{
35+
redirect: {
36+
style: false, // Turn off the redirect of the style file
37+
},
38+
},
3539
],
36-
redirect: {
37-
style: false, // Turn off the redirect of the style file
38-
},
3940
};
4041
```
4142

website/docs/en/config/lib/syntax.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ You can also set the Browserslist query, such as `last 2 versions`, `> 1%`, `nod
4747
```ts title="rslib.config.ts"
4848
export default {
4949
lib: [
50-
// ...
50+
{
51+
syntax: ['last 2 versions', '> 1%'],
52+
},
5153
],
52-
syntax: ['last 2 versions', '> 1%'],
5354
};
5455
```
5556

@@ -60,8 +61,9 @@ You can also mix ECMAScript version and Browserslist query, such as `es2015` and
6061
```ts title="rslib.config.ts"
6162
export default {
6263
lib: [
63-
// ...
64+
{
65+
syntax: ['es2015', 'node 20'],
66+
},
6467
],
65-
syntax: ['es2015', 'node 20'],
6668
};
6769
```

0 commit comments

Comments
 (0)