-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
I'm bundling a single js file, app.js
with a sourcemap app.js.map
, this sourcemap references source files by absolute paths with file:///
{
"version":3,
"file":"app.js",
"sourceRoot":"",
"sources":[
"file:////Users/geo/Projects/example/src/DomUI.hx",
When bundling with --sourcemap
esbuild bin/app.js --bundle --outfile=bin/bundle.js --sourcemap
The sorucemap sources are included but lose the full file:///
protocol, so the browser complains about missing source files
bundle.js.map
{
"version": 3,
"sources": [
"file:/Users/geo/Projects/lush-energies/src/DomUI.hx",
If I manually replace with file:///Users/...
then everything works :)
I'd guess the issue is on this line
esbuild/internal/bundler/linker.go
Line 5412 in 41b49f6
path.Text = c.fs.Join(c.fs.Dir(file.InputFile.Source.KeyPath.Text), source) |
When I get a moment out of crunch (could be a while) I'll try to get a Go environment going so I can explore this one
Using:
- esbuild 0.7.22
- macOS chrome
- webserver is live-server 1.2.1 on npm