denoland / deno_emit

Transpile and bundle JavaScript and TypeScript under Deno and Deno Deploy
https://jsr.io/@deno/emit
MIT License
217 stars 23 forks source link

Better debugging output #128

Open lionel-rowe opened 1 year ago

lionel-rowe commented 1 year ago

Currently, thrown errors usually give very little information about what's gone wrong. Most errors look like this:

error: Uncaught (in promise) Error: Unable to output during bundling.
      const ret = new Error(getStringFromWasm0(arg0, arg1));
      # ...stack trace of WASM output/JS glue code

That could be any of the following situations:

Is there any way this debugging info could be provided? Or at least a stack trace that gives the file name/line number where the problem occurs within the bundled modules, rather than in the WASM output/JS glue code.

yacinehmito commented 1 year ago

I agree, this is a real problem. I am currently stuck on a dependency that deno_emit doesn't want to bundle and I have no idea where to start. 😞

Unfortunately my knowledge of Wasm and Rust is too limited to be helpful. @dsherret Would you be able to provide some pointers on how to make this better?