Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Nix store path from source maps #1084

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

isaac-uptrust
Copy link

Obelisk successfully serves minified JS, the corresponding unminified JS, and the source map that relates the two. But the source map's sources field contains the Nix store path of the unminified JS, not a URL. Browsers try to fetch the source code from a bogus URL:
https://example.com/nix/store/HASH-compressedJs/frontend.jsexe/all.unminified.js.

This change improves the situation by tweaking the arguments to closure-compiler; using relative paths to the JS files instead of absolute paths.

Works on Chromium, but Firefox still has trouble.

Obelisk successfully serves minified JS, the corresponding unminified JS,
and the source map that relates the two. But the source map's `sources`
field contains the Nix store path of the unminified JS, not a URL. Browsers
try to fetch the source code from a bogus URL:
`https://example.com/nix/store/HASH-compressedJs/frontend.jsexe/all.unminified.js`.

This change improves the situation by tweaking the arguments to
`closure-compiler`; using relative paths to the JS files instead of absolute
paths.

Works on Chromium, but Firefox still has trouble.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant