# Modules structure and ES6 import

**URL:** <https://discuss.emberjs.com/t/modules-structure-and-es6-import/8481>\
**Category:** Uncategorized\
**Created:** [July 31, 2015, 9:10pm UTC](https://discuss.emberjs.com/t/modules-structure-and-es6-import/8481 "2015-07-31T21:10:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Youroff](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ivan_youroff/32/11168_2.png) [@Ivan\_Youroff](https://discuss.emberjs.com/u/Ivan_Youroff)\
**Post date:** [July 31, 2015, 9:10pm UTC](https://discuss.emberjs.com/t/modules-structure-and-es6-import/8481/1 "2015-07-31T21:10:25Z")

</div>

Where can I learn about Ember module structure in order to be able to selectively import only needed functions? For example it seems to be possible to do something like `import { computed } from 'ember'`, but it’s not. And `from 'ember-metal/computed'` doesn’t work either. Thanks!

---

<div class="post-metadata">

**Author:** ![okket](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/okket/32/10610_2.png) [@okket](https://discuss.emberjs.com/u/okket)\
**Post date:** [August 1, 2015, 10:37am UTC](https://discuss.emberjs.com/t/modules-structure-and-es6-import/8481/2 "2015-08-01T10:37:03Z")

</div>

I do not know what the plan for Ember.JS and ES6 module granularity is in the future, but currently you get a global `export default Ember` object that you have to deal with, on the top level. Inside Ember.JS is already finer grained, for instance see

[https://github.com/emberjs/ember.js/blob/stable/packages/ember-metal/lib/computed.js#L641-L645](https://github.com/emberjs/ember.js/blob/stable/packages/ember-metal/lib/computed.js#L641-L645)

---

<div class="post-metadata">

**Author:** ![Ivan\_Youroff](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ivan_youroff/32/11168_2.png) [@Ivan\_Youroff](https://discuss.emberjs.com/u/Ivan_Youroff)\
**Post date:** [August 1, 2015, 11:50am UTC](https://discuss.emberjs.com/t/modules-structure-and-es6-import/8481/3 "2015-08-01T11:50:28Z")

</div>

Thank you for your reply! So basically I don’t have an access to other packages that are used in Ember internally and eventually exposed under Ember namespace? I thought that from the point view of transpiller these all are packages and you just have to know the path to access exported properties of each package. I’m not very familiar with JS and ES6 in particular so I failed the attempt to found a solution by reading Ember sources.

---

<div class="post-metadata">

**Author:** ![okket](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/okket/32/10610_2.png) [@okket](https://discuss.emberjs.com/u/okket)\
**Post date:** [August 1, 2015, 2:31pm UTC](https://discuss.emberjs.com/t/modules-structure-and-es6-import/8481/4 "2015-08-01T14:31:01Z")

</div>

Everything is exposed via the `Ember` namespace, yes. Stick to the official guides and API, the source code maybe too confusing (sorry about that, but it is often worth hunting for comments and inspiration there).

[http://emberjs.com/api/modules/ember-metal.html](http://emberjs.com/api/modules/ember-metal.html)

FYI: `String` is an extended prototype, `RSVP` is the external promise polyfill thing (I guess), `RoutingService` is private.
