We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://
When an input file has a sourcemap with a http: URL in the "sources" section, esbuild mangles it.
http:
"sources"
index.js
import "./foo/index.js";
foo/index.js
// index.js throw new Error(); //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaHR0cHM6Ly9leGFtcGxlLmNvbS9pbmRleC5qcyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsidGhyb3cgbmV3IEVycm9yKCk7Il0sCiAgIm1hcHBpbmdzIjogIjtBQUFBLE1BQU0sSUFBSTsiLAogICJuYW1lcyI6IFtdCn0K
The source map of the above file looks like this:
{ "version": 3, "sources": ["https://example.com/index.js"], "sourcesContent": ["throw new Error();"], "mappings": ";AAAA,MAAM,IAAI;", "names": [] }
Then run:
esbuild --bundle --format=esm --sourcemap=inline index.js > index.dist.js
This generates the following file:
// foo/index.js throw new Error(); //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZm9vL2h0dHBzOi9leGFtcGxlLmNvbS9pbmRleC5qcyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsidGhyb3cgbmV3IEVycm9yKCk7Il0sCiAgIm1hcHBpbmdzIjogIjtBQUFBLE1BQU0sSUFBSSxNQUFBOyIsCiAgIm5hbWVzIjogW10KfQo=
This contains the following source map:
{ "version": 3, "sources": ["foo/https:/example.com/index.js"], "sourcesContent": ["throw new Error();"], "mappings": ";AAAA,MAAM,IAAI,MAAA;", "names": [] }
You can see that the sources URL here is foo/https:/example.com/index.js even though it should be https://example.com/index.js.
foo/https:/example.com/index.js
https://example.com/index.js
Possibly related #1745
The text was updated successfully, but these errors were encountered:
Closing as a duplicate.
Sorry, something went wrong.
No branches or pull requests
When an input file has a sourcemap with a
http:
URL in the"sources"
section, esbuild mangles it.index.js
foo/index.js
The source map of the above file looks like this:
Then run:
This generates the following file:
This contains the following source map:
You can see that the sources URL here is
foo/https:/example.com/index.js
even though it should behttps://example.com/index.js
.Possibly related #1745
The text was updated successfully, but these errors were encountered: