Dmitry Petrov
03/17/2021, 5:28 PM"ts-node": "ts-node --compiler-options '{\"module\":\"CommonJS\"}'"
to package.json/scripts
to allow it to run. Prior to 1.18.0 I was using the workaround suggested in this GitHub issue by elkevinwolf. All was working fine on my local dev environment, but I’m getting errors when I try to do this as part of a Vercel build. The seed.ts
file references other lib files in our codebase, almost all of which are ES6 modules. We also have baseUrl set to .
in tsconfig.json
– though I think I’ve been able to work around that. I feel that this is a result of my knowledge gap in how modules and compilers function – but since I reference ES6 modules and they have import statements, etc. all with absolute imports utilizing the basePath, things break as those functions get invoked. I’m sorry if this is somewhat vague, happy to provide code examples/errors/etc. – just want to make sure I provide what’s useful.Joël
Dmitry Petrov
03/17/2021, 5:54 PM