Skip to content

Commit e5b5a4c

Browse files
committed
feat(workspace): add composite monorepo
1 parent 8ede6d0 commit e5b5a4c

File tree

7 files changed

+41
-9
lines changed

7 files changed

+41
-9
lines changed

packages/form-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"module": "dist/esm/index.js",
3535
"exports": {
3636
".": {
37+
"@tanstack/custom-condition": "./src/index.ts",
3738
"import": {
3839
"types": "./dist/esm/index.d.ts",
3940
"default": "./dist/esm/index.js"

packages/form-core/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"moduleResolution": "Bundler"
5-
// "noErrorTruncation": true
4+
"moduleResolution": "Bundler",
5+
"rootDir": ".",
6+
"outDir": "./dist"
67
},
7-
"include": ["src", "tests", "eslint.config.js", "vite.config.ts"]
8+
"include": ["src", "tests", "*.config.*"]
89
}

packages/form-core/vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ const config = defineConfig({
1111
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] },
1212
typecheck: { enabled: true },
1313
},
14+
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
15+
resolve: {
16+
conditions: ['@tanstack/custom-condition'],
17+
},
18+
environments: {
19+
ssr: {
20+
resolve: {
21+
conditions: ['@tanstack/custom-condition'],
22+
},
23+
},
24+
},
1425
})
1526

1627
export default mergeConfig(

packages/react-form/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"module": "dist/esm/index.js",
3535
"exports": {
3636
".": {
37+
"@tanstack/custom-condition": "./src/index.ts",
3738
"import": {
3839
"types": "./dist/esm/index.d.ts",
3940
"default": "./dist/esm/index.js"

packages/react-form/tsconfig.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4+
"rootDir": ".",
5+
"outDir": "./dist",
6+
"baseUrl": ".",
7+
48
"jsx": "react-jsx",
5-
"moduleResolution": "Bundler",
6-
"paths": {
7-
"@tanstack/form-core": ["../form-core/src"]
8-
}
9+
"moduleResolution": "Bundler"
910
},
10-
"include": ["src", "tests", "eslint.config.js", "vite.config.ts"]
11+
"include": ["src", "tests", "*.config.*", "package.json"],
12+
"references": [{ "path": "../form-core" }]
1113
}

packages/react-form/vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ const config = defineConfig({
1414
coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] },
1515
typecheck: { enabled: true },
1616
},
17+
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
18+
resolve: {
19+
conditions: ['@tanstack/custom-condition'],
20+
},
21+
environments: {
22+
ssr: {
23+
resolve: {
24+
conditions: ['@tanstack/custom-condition'],
25+
},
26+
},
27+
},
1728
})
1829

1930
export default mergeConfig(

tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@
66
"allowUnreachableCode": false,
77
"allowUnusedLabels": false,
88
"checkJs": true,
9+
"composite": true,
10+
"customConditions": ["@tanstack/custom-condition"],
911
"declaration": true,
12+
"declarationMap": true,
13+
"emitDeclarationOnly": true,
1014
"esModuleInterop": true,
1115
"forceConsistentCasingInFileNames": true,
16+
"incremental": true,
1217
"isolatedModules": true,
1318
"lib": ["DOM", "DOM.Iterable", "ES2022"],
1419
"module": "ES2022",
1520
"moduleResolution": "Bundler",
16-
"noEmit": true,
21+
"noEmit": false,
1722
"noImplicitReturns": true,
1823
"noUncheckedIndexedAccess": true,
1924
"noUnusedLocals": false, // TODO enable

0 commit comments

Comments
 (0)