Skip to content
Discussion options

You must be logged in to vote

Found out that the issue was with none of the code above. In one of my components, I was dynamically importing some css in a useEffect hook and Vite preload didn't seem to like it with:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

I replaced it with a static import and it worked fine.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by seendsouza
Comment options

You must be logged in to vote
0 replies
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