fix(ts): keep baseUrl property in generated tsconfig.json (#4843)

This commit is contained in:
Kevin Marrec 2019-01-24 11:44:02 +01:00 committed by Pooya Parsa
parent 5f94120f95
commit 55dc7f4475
5 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,7 @@
{ {
"extends": "@nuxt/typescript-edge", "extends": "@nuxt/typescript-edge",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".",
"noImplicitAny": false, "noImplicitAny": false,
"types": [ "types": [
"@types/node", "@types/node",

View File

@ -1,6 +1,7 @@
{ {
"extends": "@nuxt/typescript-edge", "extends": "@nuxt/typescript-edge",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".",
"types": [ "types": [
"@types/node", "@types/node",
"@nuxt/vue-app-edge" "@nuxt/vue-app-edge"

View File

@ -22,6 +22,7 @@ export async function generateTsConfigIfMissing(rootDir) {
await writeJSON(tsConfigPath, { await writeJSON(tsConfigPath, {
extends: configToExtend, extends: configToExtend,
compilerOptions: { compilerOptions: {
baseUrl: '.',
types: [ types: [
'@types/node', '@types/node',
'@nuxt/vue-app' '@nuxt/vue-app'

View File

@ -1,6 +1,11 @@
{ {
"extends": "@nuxt/typescript", "extends": "@nuxt/typescript",
"compilerOptions": { "compilerOptions": {
"noImplicitAny": false "baseUrl": ".",
"noImplicitAny": false,
"types": [
"@types/node",
"@nuxt/vue-app"
]
} }
} }

View File

@ -22,6 +22,7 @@ describe('typescript setup', () => {
expect(await readJSON(tsConfigPath)).toEqual({ expect(await readJSON(tsConfigPath)).toEqual({
extends: '@nuxt/typescript', extends: '@nuxt/typescript',
compilerOptions: { compilerOptions: {
baseUrl: '.',
types: [ types: [
'@types/node', '@types/node',
'@nuxt/vue-app' '@nuxt/vue-app'