From 2c0088f6a252d8fd77f8924d1ef54fe1efb17b44 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 13 Sep 2021 10:57:19 -0400 Subject: [PATCH] Measure bundlesize using `@apollo/client` root package again. 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 :tada:, 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. --- config/rollup.config.js | 11 +---------- package.json | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/config/rollup.config.js b/config/rollup.config.js index 2937bc0ac9e..af7b6f8202c 100644 --- a/config/rollup.config.js +++ b/config/rollup.config.js @@ -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', ), ]; diff --git a/package.json b/package.json index 5823fd2b49e..bae4db4f962 100644 --- a/package.json +++ b/package.json @@ -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": {