Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import compileModule from '../../../utils/compileModule';
import pkg from 'babel-plugin-macros/package';
const ID = 'babel-plugin-macros';
export default {
id: ID,
displayName: ID,
version: pkg.version,
homepage: pkg.homepage,
defaultParserID: 'babylon7',
loadTransformer(callback) {
require([
'../../../transpilers/babel',
'babel7',
'recast',
'babel-plugin-macros',
], (transpile, babel, recast, macro) => callback({ transpile: transpile.default, babel, recast, macro}));
},
transform({ transpile, babel, recast, macro}, transformCode, code) {
transformCode = transpile(transformCode);
let transform = compileModule( // eslint-disable-line no-shadow