framework icon indicating copy to clipboard operation
framework copied to clipboard

preserve npm sourcemaps

Open Fil opened this issue 1 year ago • 0 comments

The easiest of the many things we can/want/might do with sourceMaps:

  • preserve sourceMap URL for npm modules, as links to jsdeliver

For example, at the bottom of http://127.0.0.1:3000/_npm/[email protected]/_esm.js this PR now shows:

//# sourceMappingURL=https://cdn.jsdelivr.net/sm/42676edc1731d21c3307f50afea3dbba6be989c9c9d267599113a48e3ca85bf9.map

Capture d’écran 2024-07-10 à 18 53 12

But, is this something we would only want to do in preview? We could censor the sourceMappingURL=… lines in the build.

Related issues:

  • preserve and copy sourceMaps for user code (#832)
  • create sourceMaps from user code (#805), at least in preview

Fil avatar Jul 10 '24 16:07 Fil