I am attempting to use babel to transform client side ES6 scripts to ES5, and write that to a file.
However my current setup just spits out the same code that it took in.
Code example below.
const babel = require('babel-core');
babel.transform(scripts, {}, (err, result) => {
fs.writeFileSync(
'/scripts/app.main.js',
result.code, 'utf8'
);
});