Skip to content

Commit

Permalink
fix: load exponentiation operator transform in node 6 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharygolba authored Dec 17, 2016
1 parent d71ee1e commit 48abd96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ if (process.env.NODE_ENV === 'production') {
presets.push(require('babel-preset-babili'));
}

if (!IS_NODE_SEVEN || !HAS_HARMONY_FLAG) {
plugins.push(require('babel-plugin-transform-async-to-generator'));
if (!IS_NODE_SEVEN) {
plugins.push(
require('babel-plugin-transform-exponentiation-operator'),
require('babel-plugin-transform-async-to-generator')
);
} else if (!HAS_HARMONY_FLAG) {
plugins.push(
require('babel-plugin-transform-async-to-generator')
);
}

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"babel-plugin-external-helpers": "^6.18.0",
"babel-plugin-transform-async-to-generator": "^6.8.0",
"babel-plugin-transform-class-properties": "^6.19.0",
"babel-plugin-transform-exponentiation-operator": "^6.8.0",
"babel-plugin-transform-flow-strip-types": "^6.18.0",
"babel-plugin-transform-object-rest-spread": "^6.20.2",
"babel-preset-babili": "^0.0.9"
Expand Down

0 comments on commit 48abd96

Please sign in to comment.