Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't resolve built-in components when used with the component helper #1029

Conversation

Windvis
Copy link
Collaborator

@Windvis Windvis commented Nov 20, 2021

It seems that the code that handles the component helper doesn't ignore the built-in components like the other component resolving code does.

Closes #815

@ef4
Copy link
Contributor

ef4 commented Nov 20, 2021

Nice work, thanks.

@@ -731,6 +731,11 @@ export default class CompatResolver implements Resolver {
from
);
}

if (builtInComponents.includes(component.path)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I just realized that early returning here will prevent people from "shadowing" built-in components by creating components with the same name in their project or addon. It doesn't seem like a good thing to do and I'm not sure if it's officially supported but it does seem to work (tested in Ember twiddle).

Is that something that needs to work under Embroider?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as I understand, we could check it using 'tryComponent' method

@Windvis Windvis force-pushed the fix/component-helper-resolver-ignore-built-ins branch from e5f9a23 to b4c3b10 Compare December 5, 2021 21:54
@ef4 ef4 merged commit c880396 into embroider-build:master Dec 7, 2021
@rwjblue rwjblue added the bug Something isn't working label Dec 7, 2021
@Windvis Windvis deleted the fix/component-helper-resolver-ignore-built-ins branch April 28, 2023 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{{component "link-to"}} + staticComponents error
4 participants