We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 93b39c4 + 100e322 commit 0d42d71Copy full SHA for 0d42d71
packages/addon-shim/src/index.ts
@@ -163,9 +163,12 @@ export function addonV1Shim(directory: string, options: ShimOptions = {}) {
163
}
164
autoImport.instance.registerV2Addon(name, root);
165
} else {
166
- // if we're being used by a v2 addon, it also has this shim and will
167
- // forward our registration onward to ember-auto-import
168
- (this.parent as EAI2Instance).registerV2Addon(name, root);
+ // This should only be done if we're being consumed by an addon
+ if (this.parent.pkg['ember-addon'].type === 'addon') {
+ // if we're being used by a v2 addon, it also has this shim and will
169
+ // forward our registration onward to ember-auto-import
170
+ (this.parent as EAI2Instance).registerV2Addon(name, root);
171
+ }
172
173
},
174
};
0 commit comments