evanw / evanw/node-source-map-support

are base64 dataurl's supported in sourceMappingURL?

Aperta
#100 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
2.2k
Fork
223
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Does node-source-map-support support inline sourcemaps encoded into data url's?

I'm writing ansible modules in javascript using webpack to package the javascript together into a standalone file. Ansible module's can be written in any language but must be contained in a single file -- hence the usage of webpack to run code on node ... It sounds strange perhaps, but its actually perfect for my usage and works well -- the only annoying thing is I haven't been able to get source-map to work for stack traces ...

Here's a simple example:

Input source:

```
require("source-map-support").install()

console.log("Hello");

throw Error("give me stack trace!")
```

And here's a gist showing what the webpack compiled version of the above src looks like ...

https://gist.githubusercontent.com/breathe/debf645ae49e5bd66768/raw/bab77313c1fde689645ff40e3b09fb768a3fb8b9/debug-sourcemap

Running the code in the gist above yields this output ... Any ideas?

```
Hello
Error: give me stack trace!
at Error (native)
at Object.eval (eval at (/Users/ncohen/software/ansible/sts-infrastructure/library/debug-sourcemap:49:2), :7:7)
at Object.0 (/Users/ncohen/software/ansible/sts-infrastructure/library/debug-sourcemap:49:2)
at __webpack_require__ (/Users/ncohen/software/ansible/sts-infrastructure/library/debug-sourcemap:21:30)
at /Users/ncohen/software/ansible/sts-infrastructure/library/debug-sourcemap:41:18
at Object. (/Users/ncohen/software/ansible/sts-infrastructure/library/debug-sourcemap:44:10)
at Module._compile (module.js:430:26)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.