Skip to content

Commit

Permalink
Small fix for .babelrc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Jun 23, 2019
1 parent ec10bf0 commit a197526
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const config = {
plugins: [
"@babel/proposal-class-properties",
"@babel/proposal-export-default-from",
["@babel/proposal-object-rest-spread", {
useBuiltIns: true
}],
Expand All @@ -14,8 +13,11 @@ const config = {
]
}

if (!("BABEL_ESM" in process.env)) {
config.plugins.push("@babel/transform-modules-commonjs")
if (!process.env.BABEL_ESM) {
config.plugins.push(
"@babel/transform-modules-commonjs",
"@babel/proposal-export-default-from"
)
}

module.exports = config

0 comments on commit a197526

Please sign in to comment.