From 7dbb92c25000f23e0d81e2887b144051a2b00d47 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 30 Jul 2020 16:36:58 +0800 Subject: [PATCH 1/2] fix: fix skipLibCheck default value for `vue create` --- packages/@vue/cli-plugin-typescript/generator/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@vue/cli-plugin-typescript/generator/index.js b/packages/@vue/cli-plugin-typescript/generator/index.js index d9257efe47..b555e23081 100644 --- a/packages/@vue/cli-plugin-typescript/generator/index.js +++ b/packages/@vue/cli-plugin-typescript/generator/index.js @@ -4,6 +4,7 @@ module.exports = (api, { classComponent, tsLint, lintOn = [], + skipLibCheck = true, convertJsToTs, allowJs }, rootOptions, invoking) => { @@ -90,6 +91,7 @@ module.exports = (api, { } api.render('./template', { + skipLibCheck, hasMocha: api.hasPlugin('unit-mocha'), hasJest: api.hasPlugin('unit-jest') }) From a111bc141bd8cb088636c40e3194ad173ad4dfc7 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Tue, 4 Aug 2020 16:38:55 +0800 Subject: [PATCH 2/2] fix: as skipLibCheck option default value is added at the plugin level rather than at the creator level, we need to reference it without `options.` prefix --- .../@vue/cli-plugin-typescript/generator/template/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json b/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json index a7497987c4..669c746c39 100644 --- a/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json +++ b/packages/@vue/cli-plugin-typescript/generator/template/tsconfig.json @@ -12,7 +12,7 @@ <%_ if (options.allowJs) { _%> "allowJs": true, <%_ } _%> - <%_ if (options.skipLibCheck) { _%> + <%_ if (skipLibCheck) { _%> "skipLibCheck": true, <%_ } _%> "esModuleInterop": true,