Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0 - Bundle Size increased #2910

Closed
wuifdesign opened this issue Feb 11, 2025 · 4 comments · Fixed by vuejs/devtools#795
Closed

3.0.0 - Bundle Size increased #2910

wuifdesign opened this issue Feb 11, 2025 · 4 comments · Fixed by vuejs/devtools#795
Labels
🧑‍💻 pkg:devtools Related to devtools

Comments

@wuifdesign
Copy link

wuifdesign commented Feb 11, 2025

Reproduction

Update to version 3.0.0

Steps to reproduce the bug

The bundle size dramatically increased with version 3.0.0. My demo app jumped from 106.67 kB to 163.18 kB just by updating this package to version 3.0.0. I don't think increasing the bundle size by nearly 60 kB was intended.

see: https://bundlephobia.com/package/[email protected]

Expected behavior

Get back bundle size to normal (seams like something gone wrong)

@wuifdesign wuifdesign changed the title v3 Bundle Size 3.0.0 - Bundle Size increased Feb 11, 2025
@IchIchIch
Copy link

IchIchIch commented Feb 11, 2025

The @vue/devtools-kit is now bundled, see https://bundlephobia.com/package/[email protected]

@posva
Copy link
Member

posva commented Feb 12, 2025

It seems like the dev tools api do not have (anymore) the sideEffects: false. You can patch this locally with pnpm patch. This is the diff that you can apply to a new file patches/@vue__devtools-api.patch

diff --git a/package.json b/package.json
index ef230c427bf5c2b7591d3de6cbf1c579504afad7..a41361dd13874c593878f477acf5ecf432b73f4a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
 {
   "name": "@vue/devtools-api",
   "type": "module",
+  "sideEffects": false,
   "version": "7.7.1",
   "author": "webfansplz",
   "license": "MIT",

Then in your package.json, add

 "pnpm": {                                                                                                                            
   "patchedDependencies": {                                                                                                           
     "@vue/devtools-api": "patches/@vue__devtools-api.patch"                                                                          
   }                                                                                                                                  
 }

If you don't use pnpm, you can use something like https://www.npmjs.com/package/patch-package or you can stick to v2 as this new release does not contain new changes.

@posva
Copy link
Member

posva commented Feb 12, 2025

The fix got merged at vuejs/devtools#795 so it shouldn't be too long until a new version is released. Then, I will be able to bump the dependency in pinia and publish a new version.

@steveworkman
Copy link

7.7.2 is now out with the change: https://github.com/vuejs/devtools/releases/tag/v7.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 pkg:devtools Related to devtools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants