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

Comprehensive Refactoring to Fix Fast Refresh Issues in Vite #525

Merged
merged 14 commits into from
Feb 24, 2025

Conversation

gkatrakazas
Copy link
Member

In this PR, we address the critical Fast Refresh issues that arose following our migration from CRA to Vite. The changes are targeted at resolving "[vite] (client) hmr invalidate" errors and ensuring that our development environment leverages Vite's capabilities efficiently.

Key Changes:

  • Fast Refresh Fix: Directly tackled the Fast Refresh compatibility by refactoring and correcting export statements across various components, which were causing HMR invalidate errors.
  • Context Components Refactor: Converted CredentialsContext, CredentialParserContext, OpenID4VCIContext, OpenID4VPContext, SessionContext, and StatusContext to TypeScript, optimizing them for better integration with Vite’s module reloading.
  • Naming and Structure Improvements: Renamed CredentialsContextProvider and StatusContextProvider for clarity and consistency. Changed .tsx file extensions to .ts in src/lib, reflecting non-JSX content.
  • Extraction of Logic: Extracted the extractPresentations logic from historyDetails to streamline component responsibilities and improve module handling.

@gkatrakazas gkatrakazas requested a review from kkmanos February 24, 2025 08:40
@gkatrakazas gkatrakazas marked this pull request as ready for review February 24, 2025 08:47
@gkatrakazas gkatrakazas merged commit b359e98 into master Feb 24, 2025
4 checks passed
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