folke / esbuild-runner

⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild
https://www.npmjs.com/package/esbuild-runner
Apache License 2.0
712 stars 24 forks source link

passing pre-load packages like nodejs #56

Closed sqllyw closed 2 years ago

sqllyw commented 2 years ago

Hi, trying to replace node with esr, here is the nodejs way in package.json:

"d": " node -r dotenv/config --inspect=0.0.0.0",

how can we achieve this? following not working:

 "esr": " esr -r dotenv/config --inspect=0.0.0.0",
sqllyw commented 2 years ago

following works:

"esr": "node -r dotenv/config --inspect=0.0.0.0 -r @figma/esbuild-runner/register myapp.ts",