Closed GHNewbiee closed 4 years ago
The returned map
should be a RawSourceMap
object, but in your case it's string
. So you've to do it like this
const result = await swc.transform(...);
const code = result.code;
const map = JSON.parse(result.map);
// Do other things..
return { code, map }
Sorry, total hasty negligence of mine.
In reboost/packages/plugin-babel/src/index.ts,
transformContent
function gives an error. See photo below.Note : In fact, I am trying to write a new plugin for which I follow the pattern of the above-mentioned plugin.