From 788d2ec1dc9853be4ecdef67d1a458a2b46ec9bf Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 18 Apr 2022 17:07:37 +0800 Subject: [PATCH] docs: explain skipLibCheck (#7785) --- docs/guide/features.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guide/features.md b/docs/guide/features.md index ebed85cd2d529d..06d282ae94ecd7 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -53,6 +53,8 @@ It is because `esbuild` only performs transpilation without type information, it You must set `"isolatedModules": true` in your `tsconfig.json` under `compilerOptions`, so that TS will warn you against the features that do not work with isolated transpilation. +However, some libraries (e.g. [`vue`](https://github.com/vuejs/core/issues/1228)) don't work well with `"isolatedModules": true`. You can use `"skipLibCheck": true` to temporarily suppress the errors until it is fixed upstream. + #### `useDefineForClassFields` Starting from Vite 2.5.0, the default value will be `true` if the TypeScript target is `ESNext`. It is consistent with the [behavior of `tsc` 4.3.2 and later](https://github.com/microsoft/TypeScript/pull/42663). It is also the standard ECMAScript runtime behavior.