I'm writing ES6 and using babel to generate my Yeoman generators. The problem comes in that after compiling to es5 the rendered file needs me to touch it up.
Basic generator es6 file
'use strict'
import { NamedBase } from 'yeoman-generator'
export default class MyGenerator extends NamedBase {
generateComponent () {
console.log('Name passed - ' + this.name))
}
}
after compiling
I then need to go into the generated file and change the last line from exports.default = MyGenerator;
to module.exports = MyGenerator;
to make it work.
What am I missing?
REF: my current repo: https://github.com/GantMan/irrigate/tree/7a897d4669e479cdd7b5509b1807e0b26d5c6658