diff --git a/.changeset/clever-days-rescue.md b/.changeset/clever-days-rescue.md new file mode 100644 index 0000000..c9f3319 --- /dev/null +++ b/.changeset/clever-days-rescue.md @@ -0,0 +1,5 @@ +--- +"create-better-t-stack": patch +--- + +fix nuxt template issues with bun diff --git a/apps/cli/src/helpers/project-generation/template-manager.ts b/apps/cli/src/helpers/project-generation/template-manager.ts index 98cd3c6..72197e9 100644 --- a/apps/cli/src/helpers/project-generation/template-manager.ts +++ b/apps/cli/src/helpers/project-generation/template-manager.ts @@ -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); } } diff --git a/apps/cli/templates/extras/bunfig.toml b/apps/cli/templates/extras/bunfig.toml deleted file mode 100644 index 22c0415..0000000 --- a/apps/cli/templates/extras/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[install] -linker = "isolated" \ No newline at end of file diff --git a/apps/cli/templates/extras/bunfig.toml.hbs b/apps/cli/templates/extras/bunfig.toml.hbs new file mode 100644 index 0000000..f30309c --- /dev/null +++ b/apps/cli/templates/extras/bunfig.toml.hbs @@ -0,0 +1,7 @@ +{{#if (includes frontend "nuxt")}} +# [install] +# linker = "isolated" +{{else}} +[install] +linker = "isolated" +{{/if}} diff --git a/apps/cli/templates/frontend/nuxt/package.json.hbs b/apps/cli/templates/frontend/nuxt/package.json.hbs index 416edd8..676d580 100644 --- a/apps/cli/templates/frontend/nuxt/package.json.hbs +++ b/apps/cli/templates/frontend/nuxt/package.json.hbs @@ -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" } diff --git a/apps/cli/templates/frontend/nuxt/tsconfig.json.hbs b/apps/cli/templates/frontend/nuxt/tsconfig.json.hbs index 1b295aa..b6bd9e2 100644 --- a/apps/cli/templates/frontend/nuxt/tsconfig.json.hbs +++ b/apps/cli/templates/frontend/nuxt/tsconfig.json.hbs @@ -1,9 +1,23 @@ { // https://nuxt.com/docs/guide/concepts/typescript - "extends": "./.nuxt/tsconfig.json", + "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"))}} - "references": [{ - "path": "../server" - }] + , + { + "path": "../server" + } {{/unless}} + ] }