-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi!
I'm trying to use esrap in a Rollup plugin's transform hook. It works perfectly for the code, but sourcemaps are not generated. After a quick investigation, it turns out esrap uses loc and range for sourcemaps, while Rollup uses start and end.
import { print } from "esrap";
const plugin = {
name: "dummy-plugin",
transform(code, id) {
// Works perfectly for the code, fails for sourcemaps
return print(this.parse(code), { sourceMapSource: id, sourceMapContent: code });
},
};Is there a way to make esrap and Rollup work together? Especially since you created both tools 👀
Thanks!
Related: Jahia/javascript-modules#271
jycouet
Metadata
Metadata
Assignees
Labels
No labels