-
-
Notifications
You must be signed in to change notification settings - Fork 101
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; | |
| }, |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels