From c98f76a5fae63974219155442a14fec3da5bef8c Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 16 Jul 2020 15:27:20 +0800 Subject: [PATCH] feat: add `skipLibCheck` option in the ts template (defaults to `true`) (#5688) --- .../cli-plugin-typescript/generator/template/tsconfig.json | 3 +++ packages/@vue/cli-plugin-typescript/prompts.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json b/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json index 827e958b2a..a7497987c4 100644 --- a/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json +++ b/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json @@ -12,6 +12,9 @@ <%_ if (options.allowJs) { _%> "allowJs": true, <%_ } _%> + <%_ if (options.skipLibCheck) { _%> + "skipLibCheck": true, + <%_ } _%> "esModuleInterop": true, "allowSyntheticDefaultImports": true, "sourceMap": true, diff --git a/packages/@vue/cli-plugin-typescript/prompts.js b/packages/@vue/cli-plugin-typescript/prompts.js index d47fa3306e..24f66401fc 100644 --- a/packages/@vue/cli-plugin-typescript/prompts.js +++ b/packages/@vue/cli-plugin-typescript/prompts.js @@ -48,6 +48,12 @@ const prompts = module.exports = [ type: `confirm`, message: `Allow .js files to be compiled?`, default: false + }, + { + name: 'skipLibCheck', + type: `confirm`, + message: `Skip type checking of all declaration files (recommended for apps)?`, + default: true } ]