Skip to content

Constant preamble issues when starting a fresh project #307

Answered by ElMassimo
meeoh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @meeoh!

The error from @vitejs/plugin-react is not clear, but the preamble refers to the code that creates the HMR registry.

The plugin is attempting to warn you that HMR will not work in your current setup.

Vite Ruby provides vite_react_refresh_tag, which you should add to your layout when using @vitejs/plugin-react (a good place is right after vite_client_tag).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@meeoh
Comment options

Answer selected by meeoh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants