Skip to content

Commit e2c5af0

Browse files
committed
docs: complete types and default value for lib configs
1 parent 2e8b298 commit e2c5af0

File tree

12 files changed

+112
-23
lines changed

12 files changed

+112
-23
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# lib.autoExtension
2+
3+
- **Type:** `boolean`
4+
- **Default:** `true`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# lib.autoExternal
2+
3+
- **Type:** `boolean`
4+
- **Default:** `true`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
# lib.banner
2+
3+
- **Type:**
4+
5+
```ts
6+
type Banner = {
7+
js?: string;
8+
css?: string;
9+
dts?: string;
10+
};
11+
```
12+
13+
- **Default:** `{}`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# lib.bundle
2+
3+
- **Type:** `boolean`
4+
- **Default:** `true`

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
11
# lib.dts
2+
3+
- **Type:**
4+
5+
```ts
6+
type Dts =
7+
| {
8+
build?: boolean;
9+
bundle?: boolean;
10+
distPath?: string;
11+
abortOnError?: boolean;
12+
autoExtension?: boolean;
13+
}
14+
| boolean;
15+
```
16+
17+
- **Default:** `undefined`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# lib.externalHelpers
2+
3+
- **Type:** `boolean`
4+
- **Default:** `false`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
# lib.footer
2+
3+
- **Type:**
4+
5+
```ts
6+
type Footer = {
7+
js?: string;
8+
css?: string;
9+
dts?: string;
10+
};
11+
```
12+
13+
- **Default:** `{}`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# lib.format
2+
3+
- **Type:** `string`
4+
- **Default:** `undefined`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
# lib.redirect
2+
3+
- **Type:**
4+
5+
```ts
6+
type Redirect = {
7+
style?: boolean;
8+
};
9+
```
10+
11+
- **Default:** `{}`

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ overviewHeaders: [2, 3]
66

77
- **Type:**
88

9-
```ts
10-
type Shims = {
11-
cjs?: {
12-
'import.meta.url'?: boolean;
13-
};
14-
esm?: {
15-
__filename?: boolean;
16-
__dirname?: boolean;
17-
require?: boolean;
18-
};
9+
```ts
10+
type Shims = {
11+
cjs?: {
12+
'import.meta.url'?: boolean;
1913
};
20-
```
14+
esm?: {
15+
__filename?: boolean;
16+
__dirname?: boolean;
17+
require?: boolean;
18+
};
19+
};
20+
```
2121

2222
- **Default:**
2323

24-
```js
25-
{
26-
cjs: {
27-
'import.meta.url': true,
28-
},
29-
esm: {
30-
__filename: false,
31-
__dirname: false,
32-
require: false,
33-
},
34-
}
35-
```
24+
```js
25+
const defaultShims = {
26+
cjs: {
27+
'import.meta.url': true,
28+
},
29+
esm: {
30+
__filename: false,
31+
__dirname: false,
32+
require: false,
33+
},
34+
};
35+
```
3636

3737
Used to configure the shims for CommonJS and ESM output.
3838

0 commit comments

Comments
 (0)