# Best practice for sharing ES6 code between a node server and an Ember client

**URL:** <https://discuss.emberjs.com/t/best-practice-for-sharing-es6-code-between-a-node-server-and-an-ember-client/8016>\
**Category:** Ember CLI\
**Created:** [May 16, 2015, 2:34am UTC](https://discuss.emberjs.com/t/best-practice-for-sharing-es6-code-between-a-node-server-and-an-ember-client/8016 "2015-05-16T02:34:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jasonmit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jasonmit/32/182_2.png) [@jasonmit](https://discuss.emberjs.com/u/jasonmit)\
**Post date:** [July 2, 2015, 7:49pm UTC](https://discuss.emberjs.com/t/best-practice-for-sharing-es6-code-between-a-node-server-and-an-ember-client/8016/6 "2015-07-02T19:49:04Z")

</div>

> finally including the file manually in the application HTML

You should be able to the `app.import` the “disted” file and therefore it ends up concatenated inside your vendor file.

As for the build step, I wish I had an answer… trying to solve this elegantly myself and ended up transpiling it down and wrapping it in a factory which spits out an `export` or invokes `define` depending on the environment.

---

_[View the full topic](https://discuss.emberjs.com/t/best-practice-for-sharing-es6-code-between-a-node-server-and-an-ember-client/8016)._
