Upgraded vue-jest to vue2-jest for Jest 27+ and got a 10KB bundle increase
See original GitHub issueWe updated Jest to 27.x.x and switched to vue2-jest
. We noticed our bundle increased quite a bit (10KB on zipped/minified) because a list of dependencies seems to be added to our bundle because of vue2-jest.
"@babel/code-frame@^7.16.7"
"@babel/generator@^7.16.7"
"@babel/helper-environment-visitor@^7.16.7"
"@babel/helper-function-name@^7.16.7"
"@babel/helper-get-function-arity@^7.16.7"
"@babel/helper-hoist-variables@^7.16.7"
"@babel/helper-module-imports@^7.16.7"
"@babel/helper-module-transforms@^7.16.7"
"@babel/helper-plugin-utils@^7.16.7"
"@babel/helper-simple-access@^7.16.7"
"@babel/helper-split-export-declaration@^7.16.7"
"@babel/helper-validator-identifier@^7.16.7"
"@babel/highlight@^7.16.7"
"@babel/parser@^7.16.7"
"@babel/plugin-transform-modules-commonjs@^7.2.0"
"@babel/traverse@^7.16.7"
… and more.
all these end up in our production bundle.
is the above accurate, or are we doing something wrong? Naturally, @vue/vue2-jest is in devDependencies
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
@vue/vue2-jest - npm
Start using @vue/vue2-jest in your project by running `npm i ... Add a README to your package so that users know how to...
Read more >Jest 27: New Defaults for Jest, 2021 edition
We will explain those changes of defaults and other notable breaking changes in this post, but first, let's get into some exciting new...
Read more >Writing multiple Vue components in a single file
Booking description should be a tiny component that just gets stuff ... adds the Vue template compiler to your bundle… which is around...
Read more >Jest don't mount composition-api component on Vue 2.7 + TS ...
SyntaxError: Unexpected token (1:1141) at Parser.pp$4.raise (node_modules/vue-template-es2015-compiler/buble.js:2757:13) at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t see any way those dependencies could end up in your production bundle unless you (or something in your build process) imports them. - and vue-jest is not part of that build process, presumably - being a testing library only.
I don’t think we can say much here with zero knowledge of your project’s build setup.
I don’t see how