Skip to content

Commit

Permalink
Merge pull request #3 from launchdarkly/zdavis/babel-config
Browse files Browse the repository at this point in the history
Update babel config to work in `test` without `useBuiltIns`
  • Loading branch information
eli-darkly authored Oct 31, 2019
2 parents e333469 + 2a16af0 commit f09a83a
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 36 deletions.
28 changes: 17 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
const presets = [
[
"@babel/env",
{
targets: ["last 2 versions", "ie >= 10"],
"corejs": "2",
useBuiltIns: "usage",
},
module.exports = {
presets: [
[
'@babel/env',
{
targets: ["last 2 versions", "ie >= 10"],
},
],
],
];

module.exports = { presets };
env: {
test: {
plugins: [
'@babel/plugin-transform-regenerator',
'@babel/plugin-transform-runtime',
],
},
},
};
100 changes: 75 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/plugin-transform-regenerator": "7.4.5",
"@babel/plugin-transform-runtime": "7.6.2",
"@babel/preset-env": "^7.6.3",
"@babel/runtime": "7.6.3",
"@rollup/plugin-replace": "^2.2.0",
"babel-jest": "^24.9.0",
"chai": "4.1.2",
Expand Down

0 comments on commit f09a83a

Please sign in to comment.