diff --git a/package.json b/package.json index a06f4fa4..cb737633 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "arrify": "^1.0.1", "babel-cli": "^6.26.0", "babel-jest": "^20.0.3", + "babel-macros": "^1.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-inline-environment-variables": "^0.2.0", diff --git a/src/config/babelrc.js b/src/config/babelrc.js index 0722adcd..8c463ec6 100644 --- a/src/config/babelrc.js +++ b/src/config/babelrc.js @@ -20,6 +20,7 @@ module.exports = { ifAnyDep(['react', 'preact'], require.resolve('babel-preset-react')), ].filter(Boolean), plugins: [ + require.resolve('babel-macros'), isRollup ? require.resolve('babel-plugin-external-helpers') : null, // we're actually not using JSX at all, but I'm leaving this // in here just in case we ever do (this would be easy to miss).