[RFC] Support Source Maps
While Source Maps were originally introduced in browsers for minified code, they are now essential to the JavaScript ecosystem. Module bundlers, Babel, jsx, TypeScript, ...
An increasing amount of code targeting gjs is written in TypeScript and there seem to be growing interest for it.
In addition, JavaScript is a popular target; Kotlin, Reason, ClojureScript, Nim, Dart, Haxe, Scala, WebAssembly, ReScript ...
Source Maps support for stack trace in gjs would improve the debugging experience of compile-to-js users and interoperability with the wider JavaScript ecosystem.
I don't think SpiderMonkey has an API for this like v8 does. I guess a good starting point is to write a user-land PoC and decide if it's worth adding to gjs.
WDYT?
Links
- Mozilla JS implementation
- Deno port
- Node.js built-in impl
- Node.js userland impl
Edited by Sonny Piers