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: docs/options/config-file.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,17 @@ tsdown --no-config
62
62
63
63
This is useful if you want to rely solely on command-line options or default settings.
64
64
65
+
## Config Loaders
66
+
67
+
`tsdown` supports multiple config loaders to accommodate various file formats. You can select a config loader using the `--config-loader` option. The available loaders are:
68
+
69
+
-`auto` (default): Utilizes native runtime loading for TypeScript if supported; otherwise, defaults to `unconfig`.
70
+
-`native`: Loads TypeScript configuration files using native runtime support. Requires a compatible environment, such as the latest Node.js, Deno, or Bun.
71
+
-`unconfig`: Loads configuration files with the `unconfig` library, ensuring broad compatibility across different runtimes.
72
+
73
+
> [!TIP]
74
+
> Node.js does not natively support importing TypeScript files without specifying the file extension. If you are using Node.js and want to load a TypeScript config file without including the `.ts` extension, consider using the `unconfig` loader for seamless compatibility.
75
+
65
76
## Extending Vite or Vitest Config (Experimental)
66
77
67
78
`tsdown` provides an **experimental** feature to extend your existing Vite or Vitest configuration files. This allows you to reuse specific configuration options, such as `resolve` and `plugins`, while ignoring others that are not relevant to `tsdown`.
0 commit comments