mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 18:37:21 +00:00
fix(ts): keep baseUrl property in generated tsconfig.json (#4843)
This commit is contained in:
parent
5f94120f95
commit
55dc7f4475
@ -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",
|
||||||
|
@ -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"
|
||||||
|
@ -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'
|
||||||
|
7
test/fixtures/typescript/tsconfig.json
vendored
7
test/fixtures/typescript/tsconfig.json
vendored
@ -1,6 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": "@nuxt/typescript",
|
"extends": "@nuxt/typescript",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"noImplicitAny": false
|
"baseUrl": ".",
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"types": [
|
||||||
|
"@types/node",
|
||||||
|
"@nuxt/vue-app"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user