drizzle-team / drizzle-team/drizzle-orm
Issues with monorepo and tsx imports with esbuild
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
Hi,
Thanks for the awesome library.
I am currently running into an issue where a subimport of my schemas export some tsx files in my monorepo.
This causes all `drizzle-kit` commands to fail (e.g. even `drizzle-kit studio`) while pulling in my schemas, as the `loader` option is set to `ts` for `esbuild-loader` in the call to `register` in `src/cli/commands/utils.ts`.
Can you please update this from `ts` to `tsx` to the load does die on jsx syntax?
I would submit a PR but couldn't find a repo with code :sweat_smile:
```
try {
return register({
format: "cjs",
loader: "ts"
});
} catch {
return {
unregister: () => {
}
};
}
```
to:
```
try {
return register({
format: "cjs",
loader: "tsx"
});
} catch {
return {
unregister: () => {
}
};
}
```
Contributor guide
Assessment
This issue has not been assessed yet.