Getting custom addon directories to appear in an app


Typically, when I generate a file for an addon, it adds files to both the addon and app directories. In turn, requirejs.entries contains references to both the addon’s original file and the version consumed by the app itself. For instance, if I had generated a Foo component, requirejs.entries would have both:


Now let’s say that I want a directory to contain classes that don’t fit neatly into what Ember already offers (components, services, models, etc). Let’s call the directory bazs, and give it a Foo of it’s own. Next, we’ll go into the apps directory and create a bazs folder there, then create a foo.js which imports the addon’s bazs/foo and re-exports it.

After all this, I would expect requirejs.entries to have a reference to bazs/foo in both the addon and app, but instead it only appears:


I haven’t worked very intimately with the resolver (I’m assuming this is the resolver’s responsibility), and so I’m not sure why this is happening. Anybody have insights? And if I wanted the app to also have reference to bazs, anybody know of a way to make that happen?