tc39 / source-map

Source map specification, RFCs and new proposals.

Home Page:https://tc39.es/source-map/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Omit node_modules libs' sourcemaps from app sourcemaps without hurting debuggability?

justingrant opened this issue · comments

For most JS apps, the vast majority of bundled code is library dependencies of the app, not code written by the app developer. Most of those libraries are published in the NPM registry.

Can these two facts be leveraged to dramatically shrink the size of app sourcemaps by pointing to external URLs for library sourcemaps instead of including library sources in app sourcemaps?

If yes, then does that scenario work today, using current bundlers, build tools, and debuggers?

If not, what would need to change to make it work?

I know the long-term goal is to completely decouple sourcemap download from code download, but I'm wondering if enabling JIT library sourcemap downloads might be a useful intermediate step.

This ability has been recently removed from the spec: #29