Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Add version argument to @babel/plugin-transform-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Harris authored and Jon Harris committed Jan 28, 2020
1 parent b59eb97 commit 82b9b0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/porter-babel/src/babel-config.js
@@ -1,6 +1,10 @@
const createBaseBabelConfig = require("@porterjs/babel-config");

module.exports =function createBabelConfig({ targets, options, mode, modules = true, presets = [], plugins = [] }) {
plugins = plugins.concat(["@babel/plugin-transform-runtime"]);
let babelVersion = "7.5.0";
try {
babelVersion = require('@babel/helpers/package.json').version;
} catch (ex) {}
plugins = plugins.concat([["@babel/plugin-transform-runtime", { version: babelVersion }]]);
return createBaseBabelConfig({ targets, options, mode, modules, presets, plugins });
}

0 comments on commit 82b9b0a

Please sign in to comment.