diff --git a/packages/connect-query-core/package.json b/packages/connect-query-core/package.json index 839f8f6d..b67d2abd 100644 --- a/packages/connect-query-core/package.json +++ b/packages/connect-query-core/package.json @@ -11,8 +11,8 @@ "scripts": { "prebuild": "rm -rf ./dist/*", "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --project tsconfig.cjs.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", - "build:esm": "tsc --project tsconfig.esm.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", + "build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", + "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", "test": "vitest --run", "test:watch": "vitest --watch", "format": "prettier --write --ignore-unknown '.' '!dist'", diff --git a/packages/connect-query-core/tsconfig.build.json b/packages/connect-query-core/tsconfig.build.json new file mode 100644 index 00000000..dbfb81d9 --- /dev/null +++ b/packages/connect-query-core/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.base.json", + "files": ["src/index.ts"] +} diff --git a/packages/connect-query-core/tsconfig.cjs.json b/packages/connect-query-core/tsconfig.cjs.json deleted file mode 100644 index 6dd78e69..00000000 --- a/packages/connect-query-core/tsconfig.cjs.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.test.ts", "**/*.test.tsx", "vite.config.ts"] -} diff --git a/packages/connect-query-core/tsconfig.esm.json b/packages/connect-query-core/tsconfig.esm.json deleted file mode 100644 index d1a1750e..00000000 --- a/packages/connect-query-core/tsconfig.esm.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["vite.config.ts"] -} diff --git a/packages/connect-query-core/tsconfig.json b/packages/connect-query-core/tsconfig.json index 2c66b617..acbbe377 100644 --- a/packages/connect-query-core/tsconfig.json +++ b/packages/connect-query-core/tsconfig.json @@ -1,10 +1,9 @@ { - "files": ["src/index.ts"], "include": [ "**/*.test.ts", "**/*.test.tsx", "src/test/**.tsx", "vite.config.ts" ], - "extends": "../../tsconfig.base.json" + "extends": "./tsconfig.build.json" } diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index bce9b616..4297407d 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -11,8 +11,8 @@ "scripts": { "prebuild": "rm -rf ./dist/*", "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc --project tsconfig.cjs.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", - "build:esm": "tsc --project tsconfig.esm.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", + "build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", + "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", "test": "vitest --run", "test:watch": "vitest --watch", "format": "prettier --write --ignore-unknown '.' '!dist'", diff --git a/packages/connect-query/tsconfig.build.json b/packages/connect-query/tsconfig.build.json new file mode 100644 index 00000000..078dd5d4 --- /dev/null +++ b/packages/connect-query/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.base.json", + "files": ["src/index.ts"], + "compilerOptions": { + "jsx": "react-jsx" + } +} diff --git a/packages/connect-query/tsconfig.cjs.json b/packages/connect-query/tsconfig.cjs.json deleted file mode 100644 index 6dd78e69..00000000 --- a/packages/connect-query/tsconfig.cjs.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/*.test.ts", "**/*.test.tsx", "vite.config.ts"] -} diff --git a/packages/connect-query/tsconfig.esm.json b/packages/connect-query/tsconfig.esm.json deleted file mode 100644 index d1a1750e..00000000 --- a/packages/connect-query/tsconfig.esm.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["vite.config.ts"] -} diff --git a/packages/connect-query/tsconfig.json b/packages/connect-query/tsconfig.json index 5f798409..acbbe377 100644 --- a/packages/connect-query/tsconfig.json +++ b/packages/connect-query/tsconfig.json @@ -1,13 +1,9 @@ { - "files": ["src/index.ts"], "include": [ "**/*.test.ts", "**/*.test.tsx", "src/test/**.tsx", "vite.config.ts" ], - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "jsx": "react-jsx" - } + "extends": "./tsconfig.build.json" }