This message was deleted.
# typescript
s
This message was deleted.
l
So long as you're happy to put this in all your Pulumi.yaml files, you should be ok:
Copy code
runtime:
  name: nodejs
  options:
    nodeargs: "--loader ts-node/esm --no-warnings"
The vanilla TS implementation doesn't use the ESM loader. You need to add this to wire it in.
a
Ah, got it. I’ll probably stick to CJS builds then. Less configuration for other teams, as they can begin with the normal starter templates. (guess that’s another thing I’d have to look into as well, templates to bake in the ESM loader 😅 ) Thanks for the info! Do you have any recommendations for build tools for this usecase? Like tsup vs. parcel.
l
No, I don't know what either of those are. I've never needed anything more than npm or yarn.
d
A few weeks late on this, but we use tsup in our monorepo without any issues for libraries (and esbuild for our lambdas)