I'm doing some test development and creating a Chrome extension using Svelte and ParcelJS and would like to see the sourcemaps in chrome dev tools. When looking at any page however I can only see the bundled code see this error:
DevTools failed to load SourceMap: Could not load content for chrome-extension://debafkiakedogoflaalmbbfbbccnfbib/Background/index.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
It seems the loader does not like the chrome-extension
url scheme. I've tried adding 'dist' as an override directory, but whatever loads the sourcemaps seems to ignore it
and still uses the 'chrome-extension` scheme.
I am able to get it working by manually changing the url to another schema, either a file:///
url or running a simple http server in the dist directory and using an http://
url:
//# sourceMappingURL=file:///c:/git/svelte-extension/dist//Background/index.js.map`
//# sourceMappingURL=http://localhost:8080/Background/index.js.map`
Is there a way to either get chrome to override the directory or tell parcel to create those urls?
data:application/json
URLs in webpack and source URLs show up aswebpack://....
– Stott