Search code examples
ember.jsmigrationember-cliadd-on

Include only part of ember addon in ember app


Currently I'm working on a project which uses Ember and requirejs. My plan is to migrate the project to ember-cli, but I'm facing some problems.

My app consists of multiple apps and one shared folder in which I put shared code of all other apps (like models, adapters, serializers, helpers, routes etc.). Not all of this code is used by every app, they only require what they need.

My plan is to create multiple ember apps of the apps mentioned above and move the shared code to an ember addon. Now I am wondering if it is possible to only include a part of this ember addon into the applications (only what they need). I did not find any relevant information in the docs for this use case.

Any ideas would be appreciated.


Solution

  • I ended up using the addon folder within my addon to share most of the files. This files can be imported from all apps and when building only the imported files are included into the final build file.