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
710 stars 24 forks source link

Support esbuild-runner.config.cjs (or customizable esbuild-runner config file) #54

Open ItalyPaleAle opened 2 years ago

ItalyPaleAle commented 2 years ago

When the package is configured with "type": "module" all .js files are interpreted as ESM by default, including esbuild-runner.config.js. We would need to set the extension to .cjs instead.

However the file name is hardcoded and always uses .js