Skip to content

Commit

Permalink
docs: correct syntax and redirect examples (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Nov 26, 2024
1 parent 7ffd34e commit b38e48b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 5 additions & 4 deletions website/docs/en/config/lib/redirect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ If you don't need these redirects, you can turn it off, and its import path will
```ts title="rslib.config.ts"
export default {
lib: [
// ..
{
redirect: {
style: false, // Turn off the redirect of the style file
},
},
],
redirect: {
style: false, // Turn off the redirect of the style file
},
};
```

Expand Down
10 changes: 6 additions & 4 deletions website/docs/en/config/lib/syntax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ You can also set the Browserslist query, such as `last 2 versions`, `> 1%`, `nod
```ts title="rslib.config.ts"
export default {
lib: [
// ...
{
syntax: ['last 2 versions', '> 1%'],
},
],
syntax: ['last 2 versions', '> 1%'],
};
```

Expand All @@ -60,8 +61,9 @@ You can also mix ECMAScript version and Browserslist query, such as `es2015` and
```ts title="rslib.config.ts"
export default {
lib: [
// ...
{
syntax: ['es2015', 'node 20'],
},
],
syntax: ['es2015', 'node 20'],
};
```

0 comments on commit b38e48b

Please sign in to comment.