Skip to content

ESBuild 0.25 generates invalid source maps for injected define #4169

Closed
@vicb

Description

@vicb

From 0.25, ESBuild can not read back the source map it generates for defines.

See this repro

The generated source map has:

"sources": ["<define:NUM>", "", "entry.ts"],

But from 0.25, ESBuild expects sources to be URL, it will then generate the following error when parsing the source map:

Image

It sounds like ESBuild should probably encode the <define:NUM> as an URL when it generates it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions