Skip to content

Commit

Permalink
Merge pull request #7618 from kellyselden/getDefaultEmberCliBabelOptions
Browse files Browse the repository at this point in the history
simplify babel options fallback
  • Loading branch information
rwjblue committed Feb 10, 2018
2 parents 67c639d + b33fd25 commit 7359c18
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/models/addon.js
Expand Up @@ -1062,15 +1062,15 @@ let addonProto = {
}

let emberCLIBabelConfigKey = this._emberCLIBabelConfigKey();
if (!this.options[emberCLIBabelConfigKey] || !this.options[emberCLIBabelConfigKey].compileModules) {
if (!this.options[emberCLIBabelConfigKey]) {
this._warn(
`Ember CLI addons manage their own module transpilation during the \`treeForAddon\` processing. ` +
`\`${this.name}\` (found at \`${this.root}\`) has overridden the \`this.options.${emberCLIBabelConfigKey}.compileModules\` ` +
`value which conflicts with the addons ability to transpile its \`addon/\` files properly.`
`\`${this.name}\` (found at \`${this.root}\`) has overridden the \`this.options.${emberCLIBabelConfigKey}\` ` +
`options which conflicts with the addons ability to transpile its \`addon/\` files properly. ` +
`Falling back to default babel configuration options.`
);

this.options[emberCLIBabelConfigKey] = this.options[emberCLIBabelConfigKey] || {};
this.options[emberCLIBabelConfigKey].compileModules = true;
this.options[emberCLIBabelConfigKey] = this.__originalOptions[emberCLIBabelConfigKey];
}

let addonJs = this.processedAddonJsFiles(tree);
Expand Down

0 comments on commit 7359c18

Please sign in to comment.