-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate the Ember Global #706
Conversation
used by legacy code and occasionally in examples. However, it still exists and | ||
remains undeprecated. | ||
|
||
The primary motivation for deprecating the global object is for _tree shaking_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pzuraq maybe I'm missing something, could you please describe how we could do tree shaking if we do import Ember from 'ember';
? Would build system look which props get used from Ember
objet imported that way (that seem like more complex that tree shaking based on imports)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SergeAstapov it's actually the opposite, if you do not import Ember from 'ember';
anywhere in your application, then we can treeshake.
Today, we can't even if you do not import it explicitly, because any code anywhere could reference the Ember global dynamically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pzuraq thanks for clarification!
44f9b82
to
530d04b
Compare
We discussed this at todays core team meeting, and are moving it into final comment period. |
How is this going to affect Ref: https://discord.com/channels/480462759797063690/486243207072710656/803662597835456542 |
Ember Inspector uses a lot of intimate/private APIs, so we can expose something for it to read to get access to the things it needs. It doesn't need to be public, so we can figure out the details when the time comes. |
of window.Ember RFC: emberjs/rfcs#706 tl;dr: Recommend `import Ember from 'ember';` instead of using the window.Ember global
… window.Ember RFC: emberjs/rfcs#706 tl;dr: Recommend `import Ember from 'ember';` instead of using the window.Ember global
Rendered