Fails to shake Apollo Client
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- tooling
Research direction
Start by reproducing the issue with the provided test.js example and Browserify command. Inspect how common-shakeify handles the Apollo Client CommonJS bundle at the linked version; done means the generated minified bundle contains only ApolloClient and its dependencies rather than the entire bundle.
Written by the indexing model from the issue text.
Description
This plugin fails to shake Apollo Client leading to an immensely bloated bundle.
Apollo Client provides a CommonJS bundle, which allegedly is targeted for Node, but I can't see anything about that bundle which would throw off common-shakeify.
This simple example, which should include only the base ApolloClient class and its dependencies actually includes the entire Apollo Client bundle, resulting in a minified bundle size of ~490 kb.
// test.js
var { ApolloClient } = require('@apollo/client/core')
module.exports = new ApolloClient({})
$ npx browserify -p common-shakeify -g uglifyify test.js | wc -c
486954
This is the Apollo Client CommonJS bundle: https://unpkg.com/@apollo/client@3.2.5/core/core.cjs.js
- Dominant language
- JavaScript
- Stars
- 103
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browserify/common-shakeify
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
browserify/common-shakeify#52 · 1 comment · 1 reaction ·
-
Breaks split-require Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
bug
browserify/common-shakeify#41 · 3 comments · 1 reaction · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
browserify/common-shakeify#38 · 1 reaction ·
All issues in browserify/common-shakeify
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·