diff --git a/.changeset/grumpy-comics-boil.md b/.changeset/grumpy-comics-boil.md new file mode 100644 index 0000000..b7be969 --- /dev/null +++ b/.changeset/grumpy-comics-boil.md @@ -0,0 +1,5 @@ +--- +"create-better-t-stack": patch +--- + +add server references in web apps diff --git a/apps/cli/templates/frontend/native/nativewind/tsconfig.json b/apps/cli/templates/frontend/native/nativewind/tsconfig.json index 2f35dd4..487386a 100644 --- a/apps/cli/templates/frontend/native/nativewind/tsconfig.json +++ b/apps/cli/templates/frontend/native/nativewind/tsconfig.json @@ -14,5 +14,8 @@ ".expo/types/**/*.ts", "expo-env.d.ts", "nativewind-env.d.ts" - ] -} \ No newline at end of file + ], + "references": [{ + "path": "../server" + }] +} diff --git a/apps/cli/templates/frontend/native/unistyles/tsconfig.json b/apps/cli/templates/frontend/native/unistyles/tsconfig.json index 9b197f6..d2c4916 100644 --- a/apps/cli/templates/frontend/native/unistyles/tsconfig.json +++ b/apps/cli/templates/frontend/native/unistyles/tsconfig.json @@ -8,5 +8,8 @@ "@/*": ["*"] } }, - "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"] + "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"], + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/nuxt/tsconfig.json b/apps/cli/templates/frontend/nuxt/tsconfig.json index a746f2a..d322c58 100644 --- a/apps/cli/templates/frontend/nuxt/tsconfig.json +++ b/apps/cli/templates/frontend/nuxt/tsconfig.json @@ -1,4 +1,7 @@ { // https://nuxt.com/docs/guide/concepts/typescript - "extends": "./.nuxt/tsconfig.json" + "extends": "./.nuxt/tsconfig.json", + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/react/next/tsconfig.json b/apps/cli/templates/frontend/react/next/tsconfig.json index c1ecaaf..34c5485 100644 --- a/apps/cli/templates/frontend/react/next/tsconfig.json +++ b/apps/cli/templates/frontend/react/next/tsconfig.json @@ -24,5 +24,8 @@ } }, "include": ["./next-env.d.ts", "./**/*.ts", "./**/*.tsx", "./.next/types/**/*.ts"], - "exclude": ["./node_modules"] + "exclude": ["./node_modules"], + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/react/react-router/tsconfig.json b/apps/cli/templates/frontend/react/react-router/tsconfig.json index 61235c3..030bdbe 100644 --- a/apps/cli/templates/frontend/react/react-router/tsconfig.json +++ b/apps/cli/templates/frontend/react/react-router/tsconfig.json @@ -23,5 +23,8 @@ "resolveJsonModule": true, "skipLibCheck": true, "strict": true - } + }, + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/react/tanstack-router/tsconfig.json b/apps/cli/templates/frontend/react/tanstack-router/tsconfig.json index 5d36acb..2845b4d 100644 --- a/apps/cli/templates/frontend/react/tanstack-router/tsconfig.json +++ b/apps/cli/templates/frontend/react/tanstack-router/tsconfig.json @@ -14,5 +14,8 @@ "paths": { "@/*": ["./src/*"] } - } + }, + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/react/tanstack-start/tsconfig.json b/apps/cli/templates/frontend/react/tanstack-start/tsconfig.json index fbb99a2..04ac163 100644 --- a/apps/cli/templates/frontend/react/tanstack-start/tsconfig.json +++ b/apps/cli/templates/frontend/react/tanstack-start/tsconfig.json @@ -24,5 +24,8 @@ "paths": { "@/*": ["./src/*"] } - } + }, + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/solid/tsconfig.json b/apps/cli/templates/frontend/solid/tsconfig.json index a805e10..b733483 100644 --- a/apps/cli/templates/frontend/solid/tsconfig.json +++ b/apps/cli/templates/frontend/solid/tsconfig.json @@ -25,5 +25,8 @@ "paths": { "@/*": ["./src/*"] } - } + }, + "references": [{ + "path": "../server" + }] } diff --git a/apps/cli/templates/frontend/svelte/tsconfig.json b/apps/cli/templates/frontend/svelte/tsconfig.json index 0b2d886..6a5b9fe 100644 --- a/apps/cli/templates/frontend/svelte/tsconfig.json +++ b/apps/cli/templates/frontend/svelte/tsconfig.json @@ -10,7 +10,10 @@ "sourceMap": true, "strict": true, "moduleResolution": "bundler" - } + }, + "references": [{ + "path": "../server" + }] // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files // diff --git a/bun.lock b/bun.lock index 058ef80..be9e809 100644 --- a/bun.lock +++ b/bun.lock @@ -14,7 +14,7 @@ }, "apps/cli": { "name": "create-better-t-stack", - "version": "2.9.5", + "version": "2.9.6", "bin": { "create-better-t-stack": "dist/index.js", },