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/guide/features.md
+7
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,13 @@ Vite only performs transpilation on `.ts` files and does **NOT** perform type ch
34
34
35
35
Vite uses [esbuild](https://github.com/evanw/esbuild) to transpile TypeScript into JavaScript which is about 20~30x faster than vanilla `tsc`, and HMR updates can reflect in the browser in under 50ms.
36
36
37
+
Use the [Type-Only Imports and Export](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) syntax to avoid potential problems like type-only imports being incorrectly bundled. for example:
38
+
39
+
```ts
40
+
importtype { T } from'only/types'
41
+
exporttype { T }
42
+
```
43
+
37
44
### TypeScript Compiler Options
38
45
39
46
Some configuration fields under `compilerOptions` in `tsconfig.json` require special attention.
0 commit comments