JCoJ
Convex Community3w ago
3 replies
JCo

Convex folder is being built by the tsc command

Advice
I have a node project, using convex, but every time the build runs, the convex folder, in the root of the repo, is built resulting in all my convex .ts files becoming .js files as well, breaking builds and deploy scripts etc. As well as the code inside of the src folder at the same root being built properly into the dist folder as expected. Why might this be happening, even with convex included in the exclude part of the root tsconfig?

Below is my root tsconfig.json, and whenever I run tsc, for some reason I get a load of .js files created inside the convex folder. I send a screenshot of the project layout too, and the only place I import from convex.

{
  "compilerOptions": {
    "jsx": "react", // or "react-jsx" for React 17+, or "preserve" if you don't want TypeScript to transform JSX
    "jsxFactory": "JSX.createElement", // If you're using a custom JSX factory (like in your code)
    "jsxFragmentFactory": "JSX.Fragment", // If you're using a custom fragment factory
    "target": "ES2020",
    "module": "commonjs",
    "rootDir": "./src",
    "outDir": "./dist",
    "removeComments": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "strictNullChecks": true,
    "skipLibCheck": true
  },
  "exclude": [
    "convex",
    "node_modules",
    "dist",
    "generateREADME.ts",
    "prisma.config.ts",
    "scripts"
  ],
}


Does anyone know why this is happening and how to stop it?
image.png
image.png
Was this page helpful?