-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
The esbuild file loader generates comments listing the original source file in bundled output. Example:
// img/triangle.png
var triangle_default = "./triangle-5XHGZ7W6.png";In esbuild v0.24.1 through v0.25.1, a source map mapping with source: null is generated for the first comment of this kind in each file that uses the file loader plugin.
This problem does not appear to occur if the file that uses the external file plugin is the first file in the bundled output.
Mappings like this with null source cause Safari (18.3) (but not Chrome 135.0.7049.28 or Firefox 137.0b9) to fail to show any source mapped source files.
A very similar issue was fixed in v0.25.1 (changelog, PR), but the issue reported here was not fixed by that change.
I made a separate repo to reproduce this issue because I don't know how to use the external file loader on https://esbuild.github.io/try/