Skip to content

How to reduce the number of JS files under assets #571

Answered by Mister-Hope
qiaoshouzi asked this question in Q&A
Discussion options

You must be logged in to vote

Currenly no, you can choose webpack as default bundler, as each page will generate 2 js files in vite, but 1 in webpack. This is for scalability concern, as you should only load a page's js chunk once you choose to navigate to it.

And @meteorlxy here, some optimize could be made for vite to make sure it only generate 1 js chunk for 1 page.

Replies: 1 comment

Comment options

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