From 9f6a95c9f82878ec87fdfd7fab1ae04e72a2638c Mon Sep 17 00:00:00 2001 From: Sebastian Werner Date: Tue, 4 Jun 2019 13:39:45 +0200 Subject: [PATCH] Exclude typeof symbol polyfill for performance reasons --- src/parts/env.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/parts/env.js b/src/parts/env.js index 1a6b8e9..2d5e3b5 100644 --- a/src/parts/env.js +++ b/src/parts/env.js @@ -6,8 +6,14 @@ import getEnvTargets from "../getEnvTargets" export default function env(presets, plugins, options) { const exclude = [] + // We use fast-async and not the very large and slow output of the + // transpilation to generator functions. exclude.push("transform-regenerator", "transform-async-to-generator") + // Inspired by CreateReactApp, we disable this minor support as it + // is documented to "make all code slower". + exclude.push('transform-typeof-symbol') + // Exclude all es2015 features which are supported by the default es2015 babel preset. // This targets all es2015-capable browsers and engines. if (options.transpile === "es2015") {