no matter what I do the map is empty on map.toString().
let path = require("path");
let content = fs.readFileSync(".\\" + file, "utf8");
let filename = path.basename(outFile)
const { code } = js(content);
fs.writeFileSync(outFile, content);
fs.writeFileSync(outMinFile, code);
let gen = new sm.SourceMapGenerator({
file: filename,
sourceRoot: "./",
});
gen.setSourceContent("CMS.Layout.js", content);
fs.writeFileSync(outMap, gen.toString());
results in:
{"version":3,"sources":[],"names":[],"mappings":"","file":"CMS.Layout.js","sourceRoot":"./","sourcesContent":[]}
what am I doing wrong?