-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure external helpers are not used when modules are not transpiled.
When using something akin to the following somewhat common pattern: ```js let babel = this.addons.find(addon => addon.name === 'ember-cli-babel'); let tree = babel.transpileTree(input, { 'ember-cli-babel': { compileModules: false, } }); ``` The previous logic would still attempt to use external helpers even when modules themselves are not being transpiled. This meant that the final output would include untranspiled `import` statements. This affects common addons such as: * ember-fetch * ember-service-worker * ember-data * @ember/test-helpers * ember-angle-bracket-invocation-polyfill * ember-modifier-manager-polyfill --- The fix here is to detect that modules will not be compiled, and avoid usage of the external helpers. This also moves the validation that parent addon's do not specify `includeExternalHelpers` in their own config to the shared `getAddonConfig` method (and makes the logic in that method a bit easier to grok).
- Loading branch information
Showing
2 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters