Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bundle size of Vue Router 4 lib became larger than Vue Router 3 lib #1937

Unanswered
Discussion options

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.

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

I think you are not treeshaking your libraries. Maybe not minifying them. You should indeed see a smaller size with Vue Router 4

You must be logged in to vote
1 reply
Comment options

I looked into bundled code. It's minified and treeshaked.
For example, there is no unused createWebHashHistory, but createWebHistory exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /