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

Browser devtools cannot load sourcemaps #3

Open
gilest opened this issue Jan 8, 2025 · 0 comments
Open

Browser devtools cannot load sourcemaps #3

gilest opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@gilest
Copy link
Owner

gilest commented Jan 8, 2025

Problem

Noticed this when the Inspector is opened with Chrome and when the Debugger is opened with Firefox.

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /assets/phoenix.mjs.map

This is due to sourcemap references in served JS files causing the devtools to attempt to load these files.

Solution

Not sure it's a good idea to analyse the JS files themselves for sourcemap references, but we could provide a mechanism to declare sourcemap files to also be copied to /priv/static/assets.

For example this works naievely by adding an additional importmap declaration:

    phoenix_map: "/deps/phoenix/priv/static/phoenix.mjs.map",
@gilest gilest added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant