Skip to content

Commit

Permalink
Add a magic inline sourcemap URL to the generated code to make the so…
Browse files Browse the repository at this point in the history
…urcemap work
  • Loading branch information
szkiba committed May 14, 2024
1 parent f3dfb30 commit 61e193c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ func (c *Compiler) compileImpl(
if err != nil {
return nil, code, err
}
// This hack is required for the source map to work
code += "\n//# sourceMappingURL=" + sourceMapURLFromBabel
return c.compileImpl(code, filename, wrap, lib.CompatibilityModeBase, state.srcMap)
}
return nil, code, err
Expand Down

0 comments on commit 61e193c

Please sign in to comment.