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

feat(ssr): avoid adding unused imports @W-17263761 #4883

Merged
merged 11 commits into from
Nov 18, 2024
Merged

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Nov 18, 2024

Details

In #4873 we added a feature to remove unused imports, but we avoid unnecessary work if we just don't add them, in the first place.

I also noticed that all we use cxt.hoist for is imports, so I smushed it into cxt.import, instead.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.
  • 💔 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.
  • 🔬 Yes, it does include an observable change.

GUS work item

@wjhsf wjhsf requested a review from a team as a code owner November 18, 2024 19:43
Copy link
Collaborator

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

I was concerned that without optimize-imports.ts we'd have to do a lot of manual bookkeeping, but this looks like a nice improvement. Looks good!

@wjhsf wjhsf merged commit 666e8fe into master Nov 18, 2024
11 checks passed
@wjhsf wjhsf deleted the wjh/unused-imports branch November 18, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants