-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
Description
Based on a previous discussion.
This is a short list of some of what can be done to reduce some of the larger items that increase the overall size of react-scripts. Excluded are smaller, opinionated, or rejected fixes.
- Currently, three versions of
acornare used.4.0.3(560 KB), used byespree,3.3.0(520 KB), used byacorn-jsxandwebpack, and2.7.04.0.8(560 KB), used byacorn-globalsandjsdom.- If Consider using Webpack 2 #183 happens, the version of
webpackrequired will require the same version ofacornthatespreeuses. - An issue has been raised for
acorn-jsxto bump their required version ofacorn, but there has been no response. - The latest release of
acorn-globalsrequires the same version ofacornthatwebpackandacorn-jsxrequire, butjsdomuses an older version. - An issue has been raised for
espreeto bump their required version ofacorn.
- If Consider using Webpack 2 #183 happens, the version of
- The version of
recursive-readdirrequired specifically requires"minimatch": "3.0.2", preventing it from deduping with the"minimatch": ">= 3.0.3"ineslint-plugin-import. Which normally wouldn't be that much of a problem, butyarnseems to put[email protected]in the basenode_modulesfolder while placing[email protected]in thenode_modulesfolders ofbabel-core,eslint-plugin-import,glob,fstream-ignore,multimatch,readdirp, andsane, meaning the same version of a ~30 KB dependency is copied six times over. Fixed with Bumprecursive-readdir. #1560. -
browserify-zlibpackages ~110 KB of tests. A PR has been filed. -
escopedepends ones6-mapandes6-weak-map. These two packages, along with their dependantsd,es5-ext,es6-iterator,es6-set, andes6-symbol, andevent-emittertake up ~560 KB. An issue has been filed on this, butescopedoes not seem to be actively maintained. It seemseslintwill forkhas forkedescopefor the next version, which does not contain the polyfills. -
istanbul-reportspackages a.nyc_outputfolder of ~310 KB. A PR has been filed. -
jsx-ast-utilspackages ayarn.lockof ~110 KB. An issue has been filed. - The version of
node-notifiercurrently used byjestrequired includes a CLI that is not used and depends on a framework that is not used elsewhere inreact-scripts. Updates node-notifier dep of jest-cli to v5 jestjs/jest#2718, which is included in[email protected], resolved this.
tbillington, timarney, markerikson, oieduardorabelo, gaearon and 11 more