As a developer,
I want to be able to run babeljs presets on my javascript files before they are parsed by uglifyjs,
So that I can make javascript code ES5 compliant so it can be parsed by uglifyjs without error.
Technically, this is possible already using alloy.jmk but it would be very nice to have a built-in way of running babeljs.
Idea is to have an additional property in the the config.json file called babeljs. Under babeljs would be a property options. This object would be passed without modification to babel.tranform(code, [options])
As a developer, I want to be able to run babeljs presets on my javascript files before they are parsed by uglifyjs, So that I can make javascript code ES5 compliant so it can be parsed by uglifyjs without error.
Technically, this is possible already using alloy.jmk but it would be very nice to have a built-in way of running babeljs.
Idea is to have an additional property in the the config.json file called
babeljs
. Underbabeljs
would be a propertyoptions
. This object would be passed without modification tobabel.tranform(code, [options])
Example