Skip to content

Browser devtools cannot load sourcemaps #3

@gilest

Description

@gilest

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions