Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

[WIP] Reduce bundle size. #2661

Merged
merged 7 commits into from
Jan 28, 2019
Merged

[WIP] Reduce bundle size. #2661

merged 7 commits into from
Jan 28, 2019

Commits on Jan 20, 2019

  1. Chore/reduce bundle size (#2659)

    Use our own flowRight-like function instead of using lodash.flowright.
    
    In addition to being smaller, this implementation does not require using CommonJS require to import a separate package.
    JoviDeCroock authored and benjamn committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    20c8048 View commit details
    Browse the repository at this point in the history
  2. Import helpers like __extends from tslib.

    This reduces the minified size of lib/react-apollo.umd.js from 28074B to
    22773B (18.9%). The minified+gzip size drops from 6930B to 6451B (6.9%).
    
    The gzip percentage is smaller because there was some repetition between
    the multiple declarations of the __extends function, and gzip is good at
    compressing long repeated substrings.
    benjamn committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    de2b5fc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2757f63 View commit details
    Browse the repository at this point in the history
  4. Provide esm bundle (#2677)

    * chore: optimize build time
    
    * fix: remove comments
    
    * tests: revert transforms
    
    * fix tests
    
    * remove babel key from pkg.json
    
    * chore: apply pr remarks
    
    * chore: undo all and add esm bundle with potential todo
    
    * remove unused babel plugins
    
    * cjs
    
    * some optimizations
    
    * add question
    
    * chore: follow pr
    
    * ignore rpt_cache
    JoviDeCroock authored and benjamn committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    408a7cf View commit details
    Browse the repository at this point in the history
  5. Bump react-apollo to version 2.5.0-bundle-size.0.

    @JoviDeCroock @Pajn @rosskevin I'm hoping this prerelease helps with
    testing the changes in PR #2661.
    benjamn committed Jan 20, 2019
    1 Configuration menu
    Copy the full SHA
    f0c395b View commit details
    Browse the repository at this point in the history
  6. Stop importing shallowEqual from fbjs/lib/shallowEqual.

    This shaves a tiny amount of bundle size, but more importantly it
    implements shallowEqual using TypeScript, and avoids one of the few
    remaining uses of require.
    benjamn committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    b72dfd6 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2019

  1. Configuration menu
    Copy the full SHA
    e2ef37a View commit details
    Browse the repository at this point in the history