<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>244814</bug_id>
          
          <creation_ts>2022-09-05 09:28:32 -0700</creation_ts>
          <short_desc>Web Inspector: incorrect line numbers when using esbuild sourcemaps</short_desc>
          <delta_ts>2022-09-20 13:23:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>Safari 15</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>235607</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sergey Rubanov">chi187</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>pangle</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1896351</commentid>
    <comment_count>0</comment_count>
    <who name="Sergey Rubanov">chi187</who>
    <bug_when>2022-09-05 09:28:32 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896389</commentid>
    <comment_count>1</comment_count>
    <who name="Sergey Rubanov">chi187</who>
    <bug_when>2022-09-05 14:21:03 -0700</bug_when>
    <thetext>Looks like it was fixed already. Safari Technology Preview 152 (Safari 16.0, WebKit 17615.1.2.3) shows correct line</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1898092</commentid>
    <comment_count>2</comment_count>
    <who name="Sergey Rubanov">chi187</who>
    <bug_when>2022-09-12 19:19:46 -0700</bug_when>
    <thetext>Lines are incorrect in Safari 16.0 (17614.1.25.9.10, 17614)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1898093</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-12 19:20:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/99850296&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1898575</commentid>
    <comment_count>4</comment_count>
    <who name="Sergey Rubanov">chi187</who>
    <bug_when>2022-09-14 16:12:43 -0700</bug_when>
    <thetext>It seems that line numbers are correct in 16.1 beta (17614.2.5, 17614)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899921</commentid>
    <comment_count>5</comment_count>
    <who name="Patrick Angle">pangle</who>
    <bug_when>2022-09-20 13:23:45 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 235607 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>