diff --git a/lib/babel-options-util.js b/lib/babel-options-util.js index c0b5f81e..f48a8956 100644 --- a/lib/babel-options-util.js +++ b/lib/babel-options-util.js @@ -46,7 +46,7 @@ function _shouldHighlightCode(parent) { return checker.gte("2.1.0"); } -function _getDebugMacroPlugins(config, parent) { +function _getDebugMacroPlugins(config, project) { let addonOptions = config["ember-cli-babel"] || {}; if (addonOptions.disableDebugTooling) { @@ -84,7 +84,7 @@ function _getDebugMacroPlugins(config, parent) { }, }; - if (_emberVersionRequiresModulesAPIPolyfill(parent)) { + if (_emberVersionRequiresModulesAPIPolyfill(project)) { emberDebugOptions.externalizeHelpers = { global: "Ember", }; @@ -114,8 +114,8 @@ function _getDebugMacroPlugins(config, parent) { ]; } -function _emberVersionRequiresModulesAPIPolyfill(parent) { - let checker = new VersionChecker(parent).for("ember-source", "npm"); +function _emberVersionRequiresModulesAPIPolyfill(project) { + let checker = new VersionChecker(project).for("ember-source", "npm"); if (!checker.exists()) { return true; } @@ -144,7 +144,7 @@ function _getEmberModulesAPIPolyfill(config, parent, project) { return; } - if (_emberVersionRequiresModulesAPIPolyfill(parent)) { + if (_emberVersionRequiresModulesAPIPolyfill(project)) { const ignore = _getEmberModulesAPIIgnore(parent, project); return [ diff --git a/lib/get-babel-options.js b/lib/get-babel-options.js index 591e88f2..7b02ef54 100644 --- a/lib/get-babel-options.js +++ b/lib/get-babel-options.js @@ -51,7 +51,7 @@ module.exports = function getBabelOptions(config, appInstance) { .concat( shouldIncludeHelpers && _getHelpersPlugin(project), userPlugins, - _getDebugMacroPlugins(config, parent), + _getDebugMacroPlugins(config, project), _getEmberModulesAPIPolyfill(config, parent, project), _getEmberDataPackagesPolyfill(config, parent), _shouldCompileModules(config, project) && _getModulesPlugin(),