const parser = 'babel'
function transformer (file, api) {
const j = api.jscodeshift;
const root = j(file.source);
// find declaration for "moment" import
return root.find(j.ImportDeclaration, { source: { value: 'moment'}}).forEach(path => {
path.value.source.value = 'dayjs'
}).toSource();
}
module.exports = transformer
module.exports.parser = parser