Fix missing babel polyfill in vendor tree #430
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe this is a fix for the mystery of the missing babel polyfill as reported in #429. It seems as though the culprit was the introduction of
cacheKeyForTree()
in #421.Since our
treeForVendor()
conditionally adds in the babel polyfill we need to consider that condition when generating the cache key for vendor.I verified this fixes the simple reproduction (new Ember app with the polyfill enabled in ember-cli-build) and it also fixes this same issue on a big app I have at work.
This is the first time I've gone under the covers of ember-cli-babel so I'm happy to be educated if there's a better strategy for fixing this.