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

`TranspileOptions["esbuild"]` type appears to be wrong #93

Open Peeja opened 2 months ago

Peeja commented 2 months ago

The esbuild option is typed as CommonOptions & TransformOptions & BuildOptions. But TransformOptions and BuildOptions have incompatible types for loader. TransformOptions only take a single Loader, while BuildOptions expects an object mapping extensions to Loaders.

TS Playground

Peeja commented 2 months ago

(Er, that's esbuild, of course, not eslint.) 😛