Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
transform(json, id) {
if (id.slice(-5) !== '.json' || !filter(id)) return null;
return {
code: dataToEsm(JSON.parse(json), {
preferConst: options.preferConst,
compact: options.compact,
namedExports: options.namedExports,
indent
}),
map: { mappings: '' }
};
}
};