feat: Create new files ext#1636
Conversation
…adar and add options to `CreateOptionsDefault`
There was a problem hiding this comment.
Hey, thanks for your contribution! 🥳
Since v9 we do support ts, cjs, cts, mts, mjs... on runtime, yet we didn't add a create command since we couldn't find the use case at time, I like this option on the create command, yet I don't think we need it at the migrate command docs.
On a side note, I'm aware that Vercel auto ignores some file extensions and paths yeah, not sure if you can disable that somewhere.
I think this problem occurred in vercel because of NodeJs v24 |
|
(Currently on mobile, so no in-depth review yet) IMO if we do this, we should also add support for mts and cts This looks like a feat instead of a chore to me Unrelated and not for this PR, but maybe it would be possible to infer e.g. based on package.json typescript dependency or tsconfig existence that the default dynamically is ts instead of js 👀 |
I'll add suport for |
I suffered from a building problem in vercel where the
.jsfile format was not accepted in the cloud environment.So added.cjsand.mjsoptions. I had the idea of adding this option to the project. I believe it is not a critical change but just another detail. I hope you accept my contribution with good heart.Suported extensions
js,ts,sqlAdded extensions :
cjs,mjs,cts,mts