JS decorator support
Hi! I am getting errors while running js decorators (running mobx example codes) in web maker..in the babel mode....would you please check whether JS decorator is enabled for babel inside web maker? Thanks!
yeah think also that should be possible, think I've identified the line where to change the babel presets:
https://github.com/chinchang/web-maker/blob/master/src/script.js#L958-L960
stage-2 needs to be changed to stage-0 & adding transform-decorators-legacy to the plugins-section.
but anyway would be cool to have a way to configure the babel-presets anyway - or have a bit more influence on how the code is transpiled in any case.
code = Babel.transform(code, {
presets: ['latest', 'stage-0', 'react'],
plugins: ["transform-decorators-legacy"]
}).code;
the code above would do it - but i ran into esprima issues - so i think