babel.js 266 B

12345678910111213
  1. 'use strict';
  2. try {
  3. // If this doesn't throw, then arrow functions are supported natively.
  4. // Do not require babel (for speed).
  5. eval('var x = () => {};');
  6. } catch (e) {
  7. require('babel-core/register')({
  8. only: /test.js$/,
  9. presets: ['es2015']
  10. });
  11. }