-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Bundle size of Vue Router 4 lib became larger than Vue Router 3 lib #1937
-
Hello everyone,
I moved my project from Vue2 to Vue3 and as you can see from screenshots Vue Router bundle size increased.
Vue3:
image
Vue2:
image
Is it correct or may be I do something wrong?
How I use Vue Router:
import { createWebHistory } from 'vue-router'
import { createRouter } from 'vue-router'
If you need any additional details I will provide them.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
I think you are not treeshaking your libraries. Maybe not minifying them. You should indeed see a smaller size with Vue Router 4
Beta Was this translation helpful? Give feedback.
All reactions
-
I looked into bundled code. It's minified and treeshaked.
For example, there is no unused createWebHashHistory, but createWebHistory exists.
Beta Was this translation helpful? Give feedback.