The extra code wrapped around s skews the source map of s. Is there any way to set the base position for the map or run the module code in an isolated context without changing source code?
|
source := "(function(exports, require, module) {" + s + "\n})" |
|
parsed, err := js.Parse(p, source, parser.WithSourceMapLoader(r.srcLoader)) |
The extra code wrapped around
sskews the source map ofs. Is there any way to set the base position for the map or run the module code in an isolated context without changing source code?goja_nodejs/require/module.go
Lines 167 to 168 in 29b559b