message: Load Babel module helpers with require.js.
diff: @@ -184,10 +184,6 @@ const babelHelperWhitelist = [
  'objectSpread',
  'toPropertyKey',
  - // modules
  - 'interopRequireDefault',
  - 'interopRequireWildcard',
  -
  // proposal-function-sent
  //'skipFirstGeneratorNext',
  @@ -203,6 +199,16 @@ const babelHelperWhitelist = [
  //'jsx',
  ];
  +/**
  + * Babel helpers needed only for ES module transformation. We bundle these with
  + * the require.js AMD module loader instead so that the AMD transform does not
  + * depend on loading all Babel helpers.
  + */
  +const moduleHelpers = [
  + 'interopRequireDefault',
  + 'interopRequireWildcard',
  +];
  +
  gulp.task('gen-babel-helpers', () => {
  const helpersCode = babelCore.buildExternalHelpers(babelHelperWhitelist);
  const minified =
  @@ -215,8 +221,10 @@ gulp.task('minify-requirejs', () => {
  const requireJsPath =
  path.join(path.dirname(require.resolve('requirejs')), '..', 'require.js');
  const requireJsCode = fs.readFileSync(requireJsPath, 'utf-8');
  + const moduleBabelHelpers = babelCore.buildExternalHelpers(moduleHelpers);
  + const combined = requireJsCode + moduleBabelHelpers;
  const minified =
  - babelCore.transform(requireJsCode, {presets: [babelPresetMinify]}).code;
  + babelCore.transform(combined, {presets: [babelPresetMinify]}).code;
  fs.mkdirpSync('./lib/');
  fs.writeFileSync('./lib/requirejs.min.js', minified, {encoding: 'utf-8'});
  });
  