MqxM
Deno3y ago
37 replies
Mqx

Using ESBuild with Deno

Hey, is anyone more familiar with ESBuild? I am currently trying to transpile my Deno TypeScript project with ESBuild in JavaScript. But I don't want to bundle the files. I just want to transpile them and put them under the same path instead of
src
in
dist
. I'm currently doing the whole thing like this:

deno run -A https://deno.land/x/esbuild@v0.19.4/mod.js —target=es2022 —outdir=dist ./src/client/**


Problem with this is that it does not resolve the import paths properly. At the end there is still the
.ts
extension in the import. Another problem is, for example, the ESBuild tries to convert the
.d.ts
files into
.d.js
which are then simply empty.
Was this page helpful?