#553

fix(templates): add electrobun.config.ts to tsconfig.json include array

OpenMHAlikhaniwants to merge intofrom

Summary

Adds ./electrobun.config.ts to the include array in every template tsconfig.json, so the root-level config file falls inside the TypeScript program and module resolution works correctly.

Problem

Template tsconfig.json files either only included "src", or had no include array at all. Since electrobun.config.ts lives at the project root — outside src/ — it was excluded from the compilation scope, and TypeScript reported:

Cannot find module 'electrobun' or its corresponding type declarations.

for this import:

import type { ElectrobunConfig } from "electrobun";

Solution

Include the config file explicitly in every template:

  • Templates that already had include: ["src"] → extended to ["src", "./electrobun.config.ts"]
  • Templates with no include field at all → added "include": ["./electrobun.config.ts"]

No other fields, files, or templates were touched.

Testing

  • Confirmed every template tsconfig.json now references ./electrobun.config.ts
  • Verified each edited file is still valid JSON (no trailing commas or syntax errors)
  • git diff reviewed to ensure only the include arrays changed

Closes #541

Activity

2
MHAlikhani1mo ago

@YoavCodes just following up on #553 in case it got buried.

The change is limited to the 31 template tsconfig.json files and fixes the project scope for electrobun.config.ts. It’s ready for review whenever you get a chance.