Publish ember-source as v2 addon #20787
Open
+4,126
−3,518
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.
This is intended as a fully non-breaking switch to publishing as a v2 addon. The published contents of the package have already been compliant with the v2 addon spec for some time, but this actually flips the setting.
Embroider builds will now be able to consume ember-source directly without ember-source going through any addon rewriting.
Classic builds will continue to get all pre-existing ember modules via the vendor.js bundle, because otherwise it would introduce observable differences in when the ember modules become available in the AMD loader. We achieved this by
renamed-modules
rules that would otherwise cause ember-auto-import to start managing the ember modules. Without this, we would get two copies of ember -- the webpack-provided one and the vendor.js provided one.Going forward, any newly-added ember modules should not go into the legacy bundles and should instead by allowed to remain in the
renamed-modules
metadata so that they'll always be consumed through webpack+ember-auto-import, making them tree-shakeable even in all classic builds.