Download a separate sourcemap file in Chrome Chrome tools

Can I download an external source map (JSON) file not included in the thumbnail JS file used on the website?

So far, the only ways I know to include the source map for a particular js file is to either embed it, add a link in the comments, or set the path in the HTTP header.

So, I am wondering - is it possible to download a source map file that cannot be accessed through HTTP? For example, download it from my local disk and point it to the js file that it should display?

Greetings

+6
source share
1 answer

I know that the question is old, but, nevertheless, I had it myself. This is how you do it in Chromium 63

Add source map

  1. Open debugger
  2. Right click in source area
  3. Select "Add Source Card ..."
  4. Enter URL for map source file
    • if the browser can download and process it, then the sources are displayed as an entry in the source tree.

PS is built with a hidden source (separate files, without the original comment)

PPS does not matter where the files are located, because it is a URL. Must be accessible via browser.

+4
source

Source: https://habr.com/ru/post/1237399/


All Articles