Skip to content

auth/forms/Auth.tsx exports are incompatible with React Fast Refresh #3269

@cprecioso

Description

@cprecioso

Note

This bug is non-blocking, when hitting it the page will just reload fully instead of hot-ly.

When Vite needs to do Hot Module Replacement on auth/forms/Auth.tsx in the SDK, it fails with the following error:

[ Client ] 3:48:50 PM [vite] (client) hmr invalidate /@fs/home/x/dev/app/.wasp/out/sdk/wasp/dist/auth/forms/Auth.jsx Could not Fast Refresh ("AuthContext" export is incompatible). Learn more at https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports

As you can see in the linked page, it is because files should only export React Components for them to correctly participate in HMR. We should split the auth/forms/Auth.tsx into a React Components file and a non-components file.

From https://discord.com/channels/686873244791210014/1429467061134032996/1429467061134032996

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions