Skip to content

Commit

Permalink
Measure bundlesize using @apollo/client root package again.
Browse files Browse the repository at this point in the history
We temporarily relaxed the bundlesize limit to include only
`@apollo/client/core` during development of Apollo Client v3.4, in part
because `QueryData` and other React-related infrastructure were
unnecessarily verbose, as you can see from the jump in bundlesize from
24.7kB to 28.4kB because of this commit.

However, @brainkim refactored the React abstractions in #8596 🎉,
eliminating `QueryData` and related classes once and for all, so I now
feel much better about including `@apollo/client/react` in the
bundlesize calculation again.
  • Loading branch information
benjamn committed Sep 13, 2021
1 parent 5a6aba0 commit 2c0088f
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.js',
),
// 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',
'./dist/apollo-core.cjs.js',
),
prepareCJSMinified(
'./dist/apollo-core.cjs.js',
'./dist/apollo-client.cjs.js',
),
];
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": "./dist/apollo-core.cjs.min.js",
"maxSize": "24.7 kB"
"path": "./dist/apollo-client.cjs.min.js",
"maxSize": "28.4 kB"
}
],
"engines": {
Expand Down

0 comments on commit 2c0088f

Please sign in to comment.