You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2019/05/09 10:32:05 UTC

[incubator-annotator] 01/04: Disable @babel/preset-env polyfills

This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit 0f56693623e33773c2a0772f9759abaf48c1f355
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Thu May 9 03:24:10 2019 -0700

    Disable @babel/preset-env polyfills
    
    Let the @babel/plugin-transform-runtime handle it.
---
 babel.config.js | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/babel.config.js b/babel.config.js
index 5c263d6..aed0a9e 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -19,26 +19,14 @@ module.exports = api => {
   const TEST = ENV === 'test';
   const CJS = ENV === 'cjs';
 
-  // Options for core-js.
-  const corejsOptions = {
-    // Do not polyfill proposals that have not shipped.
-    proposals: false,
-    // Use core-js version 3.
-    version: 3,
-  };
-
   // Options for the @babel/env preset.
   const envOptions = {
-    // Use core-js for runtime polyfills.
-    corejs: corejsOptions,
     // Transform module syntax if necessary.
     modules: CJS ? 'commonjs' : false,
     // Enable transformations for shipped proposals.
     shippedProposals: true,
     // Set target environment to default browsers.
     targets: 'defaults',
-    // Import polyfills where they are used, without polluting globals.
-    useBuiltIns: 'usage',
   };
 
   // Options for the module-resolver plugin.
@@ -51,8 +39,8 @@ module.exports = api => {
 
   // Options for the @babel/transform-runtime plugin.
   const runtimeOptions = {
-    // Use core-js for runtime helpers.
-    corejs: corejsOptions,
+    // Use core-js version 3.
+    corejs: 3,
     // Use helpers formatted for the target environment.
     useESModules: !CJS,
   };