Closed asakusuma closed 9 years ago
This is a problem in general with ember-cli addons. There is not a good API yet. See also https://github.com/ember-cli/ember-cli/issues/3718
I see. Are you opposed to a temp solution like this?
//edit: at the top of included hook
if (typeof app.import !== 'function' && app.app) {
app = app.app;
}
Tried that locally and it works. If app.import
isn't a function, the thing won't work anyways.
I think the reason why this doesn't currently work in ember-cli is because you enter in the "deps of deps" problem and currently there is no way to dedupe. Your hack may need to do for now.
@asakusuma that seems ok to me.
Great, I will open a PR
In
/lib/index.js
, theincluded
hook appears to assume that the passed argument is an app.This is true if an app is directly consuming ember-browserify. From what I can tell, if an addon is consuming ember-browserify, the passed argument has a property called
app
, but is not an app object itself. This causes an error on the first line of the included hook becauseapp.options
is undefined.