Skip to content

Consume source maps from JavaScript files #4499

Open
@kitsonk

Description

@kitsonk

Current Deno will remap stack traces on files that have been compiled by Deno, as Deno caches both the original file and the emitted map, and loads those from the cache. When consuming JavaScript with source maps from other sources (like already compiled code) Deno does not handle the source map and ignore source map pragma included in files.

Deno should support both external source maps and inline source maps when fetching modules and store any source maps in the cache to be used when remapping stack traces.

This will have the side-effect of supporting the generation of source maps for bundles generated by deno bundle.

One consideration is that source maps optionally can include the original sources. If they do, then when emitting an error, the original source line is available, but if they don't, we would not be able to log-out/resolve that original source line.

Metadata

Metadata

Assignees

Labels

clirelated to cli/ dirfeatnew feature (which has been agreed to/accepted)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions