graphql-engine/console/bin/server.babel.js
2018-06-28 10:27:37 +05:30

16 lines
323 B
JavaScript
Executable File

// enable runtime transpilation to use ES6/7 in node
const fs = require('fs');
const babelrc = fs.readFileSync('.babelrc');
let config;
try {
config = JSON.parse(babelrc);
} catch (err) {
console.error('==> ERROR: Error parsing your .babelrc.');
console.error(err);
}
require('babel-core/register')(config);