You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
svgr adds 13 MB of unique dependencies, in part because it pins a version of jsdom that falls outside of the one jest uses.
uglifyjs-webpack-plugin adds 5 MB of unique dependencies. Part of this is because it uses cacache, which brings in a lot of new and undeduped packages, but mostly it's just because it uses a new version of uglify that isn't used by handlebars or webpack. webpack switches to the new version in webpack@4.
As far as updates:
jest grew a bit since jest@22, and the babel stuff in jest-runtime doesn't dedupe so well with babel-@7. I don't have numbers on the delta there.
It's unfortunate that svgr is so large. It may or may not stay in 2.0 though.
It would be really nice to have some kind of build size and install size check that ran automatically along with the other tests. Something like: https://github.com/apps/buildsize
Cold or warm build? First build will be slower because we compile node_modules now (people overwhelmingly want that). But warm builds should not be much slower (since that data would be cached).
I took a quick look and svgr and jest 22/23 seem to be the biggest culprit as they contribute ~15MB of unique dependencies in the latest build (probably thanks to jsdom)
since we control babel-plugin-named-asset-import it might be possible to put svgr as an optional dependency like we do for sass?
Also, the largest contributor is actually rxjs (19MB), and we only include it to show a user prompt via inquirer pacakge. I think we can probably find an alternative there.
Hmm yes, it is not required for webpack usage but it is for CLI, I have to think about it. It will probably come with the v2, i plan to move into a Lerna architecture. It will be easier to do it.
@bugzpodder nwsapi 2.0.0 had accidentally been published without an .npmignore file. This was fixed in the latest release, bringing its size down to a more appropriate 74 K.
Activity
wtgtybhertgeghgtwtg commentedon Jan 20, 2018
As far as new dependencies go:
svgradds 13 MB of unique dependencies, in part because it pins a version ofjsdomthat falls outside of the onejestuses.uglifyjs-webpack-pluginadds 5 MB of unique dependencies. Part of this is because it usescacache, which brings in a lot of new and undeduped packages, but mostly it's just because it uses a new version ofuglifythat isn't used byhandlebarsorwebpack.webpackswitches to the new version inwebpack@4.As far as updates:
jestgrew a bit sincejest@22, and thebabelstuff injest-runtimedoesn't dedupe so well withbabel-@7. I don't have numbers on the delta there.iansu commentedon Jan 20, 2018
It's unfortunate that
svgris so large. It may or may not stay in 2.0 though.It would be really nice to have some kind of build size and install size check that ran automatically along with the other tests. Something like: https://github.com/apps/buildsize
gaearon commentedon Jan 22, 2018
Cold or warm build? First build will be slower because we compile
node_modulesnow (people overwhelmingly want that). But warm builds should not be much slower (since that data would be cached).gregberge commentedon May 13, 2018
@iansu I plan to update JSDOM soon, issue is already opened smooth-code/h2x#8
gregberge commentedon May 14, 2018
Done, you can upgrade to v1.9.2, it uses the last version of JSDOM and the version is not fixed. So it should solve your problem.
iansu commentedon May 14, 2018
@neoziro That's great! Thank you. I'll make a PR to update this right away.
bugzpodder commentedon May 25, 2018
I took a quick look and svgr and jest 22/23 seem to be the biggest culprit as they contribute ~15MB of unique dependencies in the latest build (probably thanks to jsdom)
since we control babel-plugin-named-asset-import it might be possible to put svgr as an optional dependency like we do for sass?
Also, the largest contributor is actually rxjs (19MB), and we only include it to show a user prompt via inquirer pacakge. I think we can probably find an alternative there.
bugzpodder commentedon May 25, 2018
I think we can downgrade inquirer to 3.3.0 as it doesn't have rxjs dependency.
gregberge commentedon May 25, 2018
I hope svgr is now sharing the same JSDOM as Jest.
bugzpodder commentedon May 25, 2018
Yep:
=> Found "jsdom@11.11.0"
info Reasons this module exists
jsdom has a dependency on nwsapi which is like 16MB.
bugzpodder commentedon May 25, 2018
svgr also has a dependency on prettier @neoziro
https://github.com/smooth-code/svgr/blob/master/package.json#L51
I guess most people installs that nowadays, but shouldn't it be a devdependency?
gregberge commentedon May 25, 2018
Hmm yes, it is not required for webpack usage but it is for CLI, I have to think about it. It will probably come with the v2, i plan to move into a Lerna architecture. It will be easier to do it.
Zirro commentedon May 27, 2018
@bugzpodder nwsapi 2.0.0 had accidentally been published without an
.npmignorefile. This was fixed in the latest release, bringing its size down to a more appropriate 74 K.styfle commentedon May 29, 2018
FYI, you can visualize npm install size over time with Package Phobia 👍
For example create-react-app@2.0.0-next.b2fd8db8
Update: I realize now you were refering to react-scripts, d'oh 😆