fix(cli): fix nuxt template issues with bun

This commit is contained in:
Aman Varshney
2025-07-31 17:26:09 +05:30
parent 4096f80eed
commit 53985feabb
6 changed files with 33 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
fix nuxt template issues with bun

View File

@@ -788,10 +788,10 @@ export async function handleExtras(projectDir: string, context: ProjectConfig) {
}
if (context.packageManager === "bun") {
const bunfigSrc = path.join(extrasDir, "bunfig.toml");
const bunfigSrc = path.join(extrasDir, "bunfig.toml.hbs");
const bunfigDest = path.join(projectDir, "bunfig.toml");
if (await fs.pathExists(bunfigSrc)) {
await fs.copy(bunfigSrc, bunfigDest);
await processTemplate(bunfigSrc, bunfigDest, context);
}
}

View File

@@ -1,2 +0,0 @@
[install]
linker = "isolated"

View File

@@ -0,0 +1,7 @@
{{#if (includes frontend "nuxt")}}
# [install]
# linker = "isolated"
{{else}}
[install]
linker = "isolated"
{{/if}}

View File

@@ -13,13 +13,13 @@
"@nuxt/ui": "3.3.0",
"@tanstack/vue-query": "^5.83.0",
"nuxt": "^4.0.2",
"tailwindcss": "^4.1.11",
"typescript": "^5.8.3",
"vue": "^3.5.18",
"vue-router": "^4.5.1",
"zod": "^4.0.2"
},
"devDependencies": {
"tailwindcss": "^4.1.11",
"@tanstack/vue-query-devtools": "^5.83.0",
"@iconify-json/lucide": "^1.2.57"
}

View File

@@ -1,9 +1,23 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
{{#unless (or (eq backend "convex") (eq backend "none"))}}
"references": [{
"path": "../server"
}]
{{/unless}}
"references": [
{
"path": "./.nuxt/tsconfig.app.json"
},
{
"path": "./.nuxt/tsconfig.server.json"
},
{
"path": "./.nuxt/tsconfig.shared.json"
},
{
"path": "./.nuxt/tsconfig.node.json"
}
{{#unless (or (eq backend "convex") (eq backend "none"))}}
,
{
"path": "../server"
}
{{/unless}}
]
}