Skip to content

Commit

Permalink
Exclude typeof symbol polyfill for performance reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Jun 4, 2019
1 parent d6d61e2 commit 9f6a95c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/parts/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 9f6a95c

Please sign in to comment.