Skip to content

Commit

Permalink
Measure bundlesize using @apollo/client root package again.
Browse files Browse the repository at this point in the history
Analogous to 2c0088f, but cherry-picked
from `main` to `release-3.5`.

Though this increases the bundlesize by +2.7kB (reflecting the weight of
`@apollo/client/react`), the same calculation on `main` gives 28.35kB,
whereas `release-3.5` now gives 27.62kB, reflecting the massive savings
from @brainkim's React refactorings in #8596.
  • Loading branch information
benjamn committed Sep 13, 2021
1 parent 97ae54f commit f33b6b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,7 @@ export default [
'./dist/index.js',
'./dist/apollo-client.cjs',
),
// The bundlesize check configured in package.json reflects the total size of
// @apollo/client/core (note the /core), rather than @apollo/client, which
// currently includes React-related exports that may not be used by all
// consumers. We are planning to confine those React exports to
// @apollo/client/react in AC4 (see issue #8190).
prepareCJS(
'./dist/core/index.js',
'./temp/bundlesize.cjs',
),
prepareCJSMinified(
'./temp/bundlesize.cjs',
'./dist/apollo-client.cjs',
),
];
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"bundlesize": [
{
"name": "apollo-client",
"path": "./temp/bundlesize.min.cjs",
"maxSize": "25 kB"
"path": "./dist/apollo-client.min.cjs",
"maxSize": "27.7 kB"
}
],
"engines": {
Expand Down

0 comments on commit f33b6b0

Please sign in to comment.