Skip to content
Permalink
Browse files

configure @babel/preset-env to import polyfills from core-js

  • Loading branch information...
nicoqh committed Jun 3, 2019
1 parent bb70a6b commit dfea023fe9c695cc8d673044c87ae98d16442e1e
Showing with 11 additions and 0 deletions.
  1. +11 −0 babel.config.js
@@ -1,6 +1,17 @@
const presets = [
["@babel/preset-env", { // Pass a config object to the preset
debug: true, // Output the targets/plugins used when compiling

// Configure how @babel/preset-env handles polyfills from core-js.
// https://babeljs.io/docs/en/babel-preset-env
useBuiltIns: 'usage',

// Specify the core-js version. Must match the version in package.json
corejs: 3,

// Specify which environments we support/target. (We have chosen to specify
// targets in .browserslistrc, so there is no need to do it here.)
// targets: "",
}],
];

0 comments on commit dfea023

Please sign in to comment.
You can’t perform that action at this time.