evanw / evanw/node-source-map-support

are base64 dataurl's supported in sourceMappingURL?

Abierto
#100 2 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
2.2k
Forks
223
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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)
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza con el gist generado por webpack enlazado en el issue y la llamada de instalación de source-map-support; después reproduce el stack trace con su URL de datos inline. Traza cómo el paquete descubre y analiza los valores de sourceMappingURL; el trabajo estará terminado cuando el stack trace del ejemplo se resuelva a las ubicaciones originales del código fuente, con una prueba de regresión que cubra el caso.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, webpack
Área
developer-experience, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
28/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.