I have a minimal example app which could be built with either Rollup (using npm run build:rollup) or esbuild (using npm run build:esbuild). https://github.com/chicoxyzzy/esbuild-sourcemaps-safari When I build the app with Rollup and then run the server (npm start), I can see that line of console.error points to correct line (line 7) in Safari Web Inspector When I build the app with esbuild, it points to the wrong line (the last line of the module — line 15) in Safari Web Inspector The line is correct for Chrome and Firefox esbuild GitHub issue: https://github.com/evanw/esbuild/issues/2522
Looks like it was fixed already. Safari Technology Preview 152 (Safari 16.0, WebKit 17615.1.2.3) shows correct line
Lines are incorrect in Safari 16.0 (17614.1.25.9.10, 17614)
<rdar://problem/99850296>
It seems that line numbers are correct in 16.1 beta (17614.2.5, 17614)
*** This bug has been marked as a duplicate of bug 235607 ***