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 } ]