Repository navigation
Closed
Description
If you want to use an MU addon with local lookup components in a classic host app, the host app has to use the MU resolver. Otherwise there's no expandLocalLookup.
ember-resolver/mu-trees/addon/resolvers/glimmer-wrapper/index.js
Lines 86 to 127 in 7338be0
| expandLocalLookup(specifier, source, namespace) { | |
| if (isAbsoluteSpecifier(specifier)) { | |
| return specifier; // specifier is absolute | |
| } | |
| if (source || namespace) { | |
| let rootName = namespace || this._configRootName; | |
| let [type] = specifier.split(':'); | |
| /* | |
| * Ember components require their lookupString to be massaged. Make this | |
| * as "pay-go" as possible. | |
| */ | |
| if (namespace) { | |
| // This is only required because: | |
| // https://github.com/glimmerjs/glimmer-di/issues/45 | |
| source = `${type}:/${rootName}/`; | |
| } else if (source) { | |
| // make absolute | |
| let parts = source.split(':src/ui/'); | |
| source = `${parts[0]}:/${rootName}/${parts[1]}`; | |
| source = source.split('/template.hbs')[0]; | |
| } | |
| let [_specifier, _source] = cleanupEmberSpecifier(specifier, source, rootName); | |
| let absoluteSpecifier = this._glimmerResolver.identify(_specifier, _source); | |
| if (absoluteSpecifier) { | |
| return absoluteSpecifier; | |
| } | |
| absoluteSpecifier = this._glimmerResolver.identify(_specifier); | |
| if (absoluteSpecifier) { | |
| return specifier; | |
| } | |
| } | |
| return specifier; | |
| }, |
Metadata
Metadata
Assignees
Labels
No labels
Activity
rwjblue commentedon Jan 2, 2019
Yep, I don't think this is a bug though...
stefanpenner commentedon Nov 19, 2019
As module unification is no more, I believe this can be closed. If I am closing this in error please let me know why, and we can reopen.