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.
@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.
@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.
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