another copy of javascript when adding tsconfig.json
i just started to add a
tsconfig.json
to my /convex dir and im getting a copy of js file for every ts file i wrote. this hasnt been the case in the past and i wonder if i've configured something wrongly? here's my tsconfig.json:
thank you 🙂6 Replies
i manually deleted all the js files
Not sure what you mean when you say you added this, Convex generates this file in the convex directory. Did you make any specific changes?
nope. my convex/ dir didnt have a tsconfig originally. i just pasted the file above and got an extra copy of duplicate *.js for every file i have under convex/
This link below is what convex generates. The only difference I see is the added jsx property, but that shouldn't cause what you're seeing. The noEmit property should keep it from generating source files.
https://github.com/get-convex/convex-js/blob/a38ad290a782ea491f502e032bc3d25e96ac200b/src/cli/codegen_templates/tsconfig.ts#L4
GitHub
convex-js/src/cli/codegen_templates/tsconfig.ts at a38ad290a782ea49...
TypeScript/JavaScript client library for Convex. Contribute to get-convex/convex-js development by creating an account on GitHub.
Try to exclude convex/ from your parent tsconfig? convex should not be generating js files either way, but your other build system (Vite/Next.js etc.) might.
that might be it ^ added /convex to exlcude in parent tsconfig