浏览代码

Disable Babel polyfill injection in dev (#27691)

Renaud Chaput 10 月之前
父节点
当前提交
3bf896c973
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      babel.config.js

+ 4 - 0
babel.config.js

@@ -52,6 +52,10 @@ module.exports = (api) => {
   case 'development':
     reactOptions.development = true;
     envOptions.debug = true;
+
+    // We need Babel to not inject polyfills in dev, as this breaks `preval` files
+    envOptions.useBuiltIns = false;
+    envOptions.corejs = undefined;
     break;
   }