binaryage / binaryage/chromex

NB: Sourcemaps from chrome-extension:// URLs don't load

Open
#21 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
413
Forks
20
PR merge metrics
No merged PRs in 30d

Description

This is more of a **heads up** for anyone attempting to write extensions in ClojureScript. Your sourcemaps, although correctly generated and present won't load. Will manifest as Warnings in Console that print URL path to respective source map with 404 and `ERR_UNRECOGNIZED_URL`. Ironically, you can click said link and happily navigate to the sourcemap.

Actual issue has been open with Chrome devs for quite some time now, but sadly gets completely drowned by noise when you try to Google it. Link to [Chrome Bug tracker](https://bugs.chromium.org/p/chromium/issues/detail?id=1053535).

Every existing Chrome build (including Canary) is effected. [Discussion in chromium-review](https://chromium-review.googlesource.com/c/chromium/src/+/2141899) mentioned a solution which someone may attempt to build from source, but the latest comment (late June 2021) marks solution as abandoned in favor of yet to be revealed one. Issue remains outstanding since at least Feb 2020, so don't hold your breath.

FWIW sourcemaps for extensions work just fine in Firefox, and in fact you should be able to load chromex examples as is. That said any code in Chromex or CLJS WebTools that touches custom Chrome APIs won't run. E.g. custom formatters and some (maybe all) stuff under `chrome.runtime` e.g. `chrome.runtime.onSuspendCanceled`

Honestly, I think Chrome devs dropped the ball big time on this one, since this probably effects any "compiles to JS" language out there including TypeScript.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.