Skip to content

Commit

Permalink
chore: use process.versions.node for @babel/preset-env
Browse files Browse the repository at this point in the history
  • Loading branch information
AVykhrystyuk committed May 10, 2021
1 parent be081f6 commit 6821e4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions babel.config.js
@@ -1,8 +1,10 @@
/* eslint-disable no-console */

const { BUILD_TYPE, BABEL_COVERAGE } = process.env;
const { node: NODE_VERSION } = process.versions;

module.exports = api => {
console.log('options ->', { apiEnv: api.env(), BUILD_TYPE, BABEL_COVERAGE });
console.log('babel config options ', { apiEnv: api.env(), BUILD_TYPE, BABEL_COVERAGE, NODE_VERSION });

return buildConfig({
isProduction: api.env('production'),
Expand Down Expand Up @@ -33,8 +35,7 @@ function buildPresetEnv({ buildType, isProduction, isTest }) {
loose: true,
modules: isTest ? 'commonjs' : false,
targets: {
// TODO: is possible to take node version from travis script?
node: '14',
node: 'current', // the same as process.versions.node
},
}];

Expand Down

0 comments on commit 6821e4f

Please sign in to comment.