Skip to content

Commit

Permalink
fix: target correct version of node in babel config (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 17, 2021
1 parent 3e5e611 commit 7ac26d1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

10 changes: 10 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable import/no-extraneous-dependencies */

const semver = require('semver');
const pkg = require('./package.json');

const supportedNodeVersion = semver.minVersion(pkg.engines.node).version;

module.exports = {
presets: [['@babel/preset-env', { targets: { node: supportedNodeVersion } }]],
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"jest-watch-select-projects": "^2.0.0",
"jest-watch-typeahead": "^0.6.4",
"prettier": "1.19.1",
"rimraf": "^3.0.2"
"rimraf": "^3.0.2",
"semver": "^6.3.0"
},
"peerDependencies": {
"eslint": "^6 || ^7",
Expand Down

0 comments on commit 7ac26d1

Please sign in to comment.