From ea0c221f3d1c47048ebeb4dbbf3cc40ad944a2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Wouts?= Date: Thu, 21 Oct 2021 22:37:51 +1100 Subject: [PATCH] docs: add a workaround to `isolatedModules: true` (#4286) --- docs/guide/features.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guide/features.md b/docs/guide/features.md index 991496469486f7..56ffeab20ad694 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -66,6 +66,8 @@ But a few libraries haven't transitioned to this new default yet, including [`li - [`jsxFactory`](https://www.typescriptlang.org/tsconfig#jsxFactory) - [`jsxFragmentFactory`](https://www.typescriptlang.org/tsconfig#jsxFragmentFactory) +If migrating your codebase to `"isolatedModules": true` is an unsurmountable effort, you may be able to get around it with a third-party plugin such as [rollup-plugin-friendly-type-imports](https://www.npmjs.com/package/rollup-plugin-friendly-type-imports). However, this approach is not officially supported by Vite. + ### Client Types Vite's default types are for its Node.js API. To shim the environment of client side code in a Vite application, add a `d.ts` declaration file: