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

Renamed modules support #642

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Renamed modules support #642

merged 2 commits into from
Oct 22, 2024

Conversation

ef4
Copy link
Collaborator

@ef4 ef4 commented Oct 22, 2024

V2 addons are allowed to declare in their package.json that they offer renamed-modules for backward compatibility. For example, when we switch ember-source to publish as V2 these names should be available directly through ember-auto-import.

Embroider uses renamed-modules extensively when auto-upgrading addons, but ember-auto-import doesn't support it yet. This PR will add it.

ef4 added 2 commits October 22, 2024 10:51
This is very similar to the existing aliasing feature. Previously, aliasing happened both during our analysis to decide which imports to handle and then again inside webpack. Now we handle it all once during analysis and emit imports for webpack that are already aliased. This means webpack doesn't need to learn about how renamed-modules too, which don't perfectly follow aliasing rules.
@ef4 ef4 marked this pull request as ready for review October 22, 2024 20:05
@ef4 ef4 added the enhancement New feature or request label Oct 22, 2024
@ef4 ef4 merged commit ce42c05 into main Oct 22, 2024
158 checks passed
@ef4 ef4 deleted the renamed-modules-support branch October 22, 2024 20:54
@github-actions github-actions bot mentioned this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant