mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
16 lines
319 B
JavaScript
Executable File
16 lines
319 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/register')(config);
|