Skip to content

Vite injects entry js to the head. Are there some particular reasons for that? is it better to inject it into the body? #3013

Answered by huajiejin
huajiejin asked this question in Q&A
Discussion options

You must be logged in to vote

I found that a script element with type=module defer by default , so its position has no effect on the dom loading, however, the position of <link rel="stylesheet" href="/assets/index.2338dd34.css"> will.

Replies: 9 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by sapphi-red
Comment options

You must be logged in to vote
0 replies

This comment was marked as spam.

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@caspii
Comment options

@siim-m
Comment options

@caspii
Comment options

This comment was marked as spam.

This comment was marked as spam.

Comment options

You must be logged in to vote
2 replies
@FabianoLothor
Comment options

@FabianoLothor
Comment options

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