Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Beta] Slightly reduce bundle size #4688

Merged
merged 1 commit into from
May 25, 2022
Merged

[Beta] Slightly reduce bundle size #4688

merged 1 commit into from
May 25, 2022

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented May 25, 2022

@github-actions
Copy link

Size Changes

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

One Hundred Eighty-nine Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 53.14 KB (🟢 -345 B) 137.36 KB
/404 52.24 KB (🟢 -345 B) 136.46 KB
/apis 53.03 KB (🟢 -345 B) 137.24 KB
/apis/createcontext 54.78 KB (🟢 -345 B) 138.99 KB
/apis/reactdom 52.97 KB (🟢 -346 B) 137.18 KB
/apis/render 55 KB (🟢 -345 B) 139.22 KB
/apis/usecontext 60.74 KB (🟢 -345 B) 144.95 KB
/apis/usereducer 60.37 KB (🟢 -346 B) 144.58 KB
/apis/useref 58.08 KB (🟢 -345 B) 142.29 KB
/apis/usestate 64 KB (🟢 -346 B) 148.21 KB
/blog 40.26 KB (🟢 -102 B) 124.48 KB
/blog/2013/06/02/jsfiddle-integration 63.05 KB (🟢 -345 B) 147.27 KB
/blog/2013/06/05/why-react 64.78 KB (🟢 -345 B) 149 KB
/blog/2013/06/12/community-roundup 64.48 KB (🟢 -346 B) 148.7 KB
/blog/2013/06/19/community-roundup-2 65.15 KB (🟢 -345 B) 149.36 KB
/blog/2013/06/21/react-v0-3-3 63.2 KB (🟢 -345 B) 147.41 KB
/blog/2013/06/27/community-roundup-3 65.52 KB (🟢 -343 B) 149.74 KB
/blog/2013/07/02/react-v0-4-autobind-by-default 63.82 KB (🟢 -344 B) 148.03 KB
/blog/2013/07/03/community-roundup-4 64.89 KB (🟢 -346 B) 149.1 KB
/blog/2013/07/11/react-v0-4-prop-validation-and-default-values 63.69 KB (🟢 -342 B) 147.91 KB
/blog/2013/07/17/react-v0-4-0 64.4 KB (🟢 -345 B) 148.62 KB
/blog/2013/07/23/community-roundup-5 65.28 KB (🟢 -346 B) 149.49 KB
/blog/2013/07/26/react-v0-4-1 63.17 KB (🟢 -345 B) 147.38 KB
/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails 63.76 KB (🟢 -345 B) 147.98 KB
/blog/2013/08/05/community-roundup-6 64.57 KB (🟢 -345 B) 148.79 KB
/blog/2013/08/19/use-react-and-jsx-in-python-applications 63.78 KB (🟢 -345 B) 148 KB
/blog/2013/08/26/community-roundup-7 64.74 KB (🟢 -345 B) 148.96 KB
/blog/2013/09/24/community-roundup-8 66.17 KB (🟢 -346 B) 150.39 KB
/blog/2013/10/03/community-roundup-9 65.11 KB (🟢 -345 B) 149.33 KB
/blog/2013/10/16/react-v0.5.0 64.79 KB (🟢 -346 B) 149.01 KB
/blog/2013/10/29/react-v0-5-1 63.15 KB (🟢 -345 B) 147.37 KB
/blog/2013/11/06/community-roundup-10 66.77 KB (🟢 -345 B) 150.99 KB
/blog/2013/11/18/community-roundup-11 65.85 KB (🟢 -345 B) 150.07 KB
/blog/2013/12/18/react-v0.5.2-v0.4.2 63.63 KB (🟢 -347 B) 147.84 KB
/blog/2013/12/19/react-v0.8.0 64.05 KB (🟢 -346 B) 148.26 KB
/blog/2013/12/23/community-roundup-12 65.51 KB (🟢 -346 B) 149.72 KB
/blog/2013/12/30/community-roundup-13 65.29 KB (🟢 -345 B) 149.5 KB
/blog/2014/01/02/react-chrome-developer-tools 63.54 KB (🟢 -345 B) 147.76 KB
/blog/2014/01/06/community-roundup-14 64.88 KB (🟢 -344 B) 149.1 KB
/blog/2014/02/05/community-roundup-15 66.1 KB (🟢 -345 B) 150.32 KB
/blog/2014/02/15/community-roundup-16 65.81 KB (🟢 -344 B) 150.03 KB
/blog/2014/02/16/react-v0.9-rc1 66.22 KB (🟢 -346 B) 150.43 KB
/blog/2014/02/20/react-v0.9 66.66 KB (🟢 -344 B) 150.88 KB
/blog/2014/02/24/community-roundup-17 65.53 KB (🟢 -346 B) 149.74 KB
/blog/2014/03/14/community-roundup-18 66.49 KB (🟢 -345 B) 150.71 KB
/blog/2014/03/19/react-v0.10-rc1 64.8 KB (🟢 -344 B) 149.02 KB
/blog/2014/03/21/react-v0.10 64.82 KB (🟢 -345 B) 149.04 KB
/blog/2014/03/28/the-road-to-1.0 64.93 KB (🟢 -346 B) 149.15 KB
/blog/2014/04/04/reactnet 63.58 KB (🟢 -345 B) 147.8 KB
/blog/2014/05/06/flux 63.7 KB (🟢 -345 B) 147.92 KB
/blog/2014/05/29/one-year-of-open-source-react 63.93 KB (🟢 -345 B) 148.14 KB
/blog/2014/06/27/community-roundup-19 65.47 KB (🟢 -345 B) 149.69 KB
/blog/2014/07/13/react-v0.11-rc1 65.85 KB (🟢 -345 B) 150.07 KB
/blog/2014/07/17/react-v0.11 67.11 KB (🟢 -345 B) 151.33 KB
/blog/2014/07/25/react-v0.11.1 64.06 KB (🟢 -346 B) 148.27 KB
/blog/2014/07/28/community-roundup-20 65.61 KB (🟢 -348 B) 149.83 KB
/blog/2014/07/30/flux-actions-and-the-dispatcher 65.25 KB (🟢 -346 B) 149.46 KB
/blog/2014/08/03/community-roundup-21 65.28 KB (🟢 -346 B) 149.5 KB
/blog/2014/09/03/introducing-the-jsx-specification 63.28 KB (🟢 -346 B) 147.5 KB
/blog/2014/09/12/community-round-up-22 65.76 KB (🟢 -345 B) 149.98 KB
/blog/2014/09/16/react-v0.11.2 64.06 KB (🟢 -345 B) 148.27 KB
/blog/2014/09/24/testing-flux-applications 67.24 KB (🟢 -345 B) 151.45 KB
/blog/2014/10/14/introducing-react-elements 66.19 KB (🟢 -345 B) 150.41 KB
/blog/2014/10/16/react-v0.12-rc1 66.16 KB (🟢 -343 B) 150.38 KB
/blog/2014/10/17/community-roundup-23 66.73 KB (🟢 -345 B) 150.94 KB
/blog/2014/10/27/react-js-conf 63.33 KB (🟢 -344 B) 147.55 KB
/blog/2014/10/28/react-v0.12 66.1 KB (🟢 -346 B) 150.32 KB
/blog/2014/11/24/react-js-conf-updates 63.72 KB (🟢 -345 B) 147.93 KB
/blog/2014/11/25/community-roundup-24 66.96 KB (🟢 -345 B) 151.17 KB
/blog/2014/12/18/react-v0.12.2 63.74 KB (🟢 -346 B) 147.96 KB
/blog/2014/12/19/react-js-conf-diversity-scholarship 64.14 KB (🟢 -345 B) 148.36 KB
/blog/2015/01/27/react-v0.13.0-beta-1 65.11 KB (🟢 -345 B) 149.33 KB
/blog/2015/02/18/react-conf-roundup-2015 67.09 KB (🟢 -345 B) 151.31 KB
/blog/2015/02/20/introducing-relay-and-graphql 66.25 KB (🟢 -344 B) 150.46 KB
/blog/2015/02/24/react-v0.13-rc1 65.15 KB (🟢 -345 B) 149.36 KB
/blog/2015/02/24/streamlining-react-elements 67.7 KB (🟢 -346 B) 151.91 KB
/blog/2015/03/03/react-v0.13-rc2 64.48 KB (🟢 -345 B) 148.7 KB
/blog/2015/03/04/community-roundup-25 65.44 KB (🟢 -345 B) 149.66 KB
/blog/2015/03/10/react-v0.13 65.76 KB (🟢 -345 B) 149.98 KB
/blog/2015/03/16/react-v0.13.1 63.58 KB (🟢 -345 B) 147.8 KB
/blog/2015/03/19/building-the-facebook-news-feed-with-relay 66.34 KB (🟢 -346 B) 150.55 KB
/blog/2015/03/26/introducing-react-native 63.48 KB (🟢 -345 B) 147.69 KB
/blog/2015/03/30/community-roundup-26 65.41 KB (🟢 -345 B) 149.62 KB
/blog/2015/04/17/react-native-v0.4 64.32 KB (🟢 -345 B) 148.54 KB
/blog/2015/04/18/react-v0.13.2 63.66 KB (🟢 -343 B) 147.88 KB
/blog/2015/05/01/graphql-introduction 68.15 KB (🟢 -345 B) 152.37 KB
/blog/2015/05/08/react-v0.13.3 63.54 KB (🟢 -346 B) 147.76 KB
/blog/2015/05/22/react-native-release-process 63.7 KB (🟢 -345 B) 147.92 KB
/blog/2015/06/12/deprecating-jstransform-and-react-tools 64.15 KB (🟢 -346 B) 148.37 KB
/blog/2015/07/03/react-v0.14-beta-1 65.66 KB (🟢 -345 B) 149.88 KB
/blog/2015/08/03/new-react-devtools-beta 64.26 KB (🟢 -345 B) 148.48 KB
/blog/2015/08/11/relay-technical-preview 64.33 KB (🟢 -345 B) 148.54 KB
/blog/2015/08/13/reacteurope-roundup 65.91 KB (🟢 -345 B) 150.13 KB
/blog/2015/09/02/new-react-developer-tools 63.68 KB (🟢 -345 B) 147.89 KB
/blog/2015/09/10/react-v0.14-rc1 69.37 KB (🟢 -346 B) 153.58 KB
/blog/2015/09/14/community-roundup-27 65.84 KB (🟢 -344 B) 150.06 KB
/blog/2015/10/01/react-render-and-top-level-api 64.81 KB (🟢 -345 B) 149.03 KB
/blog/2015/10/07/react-v0.14 69.85 KB (🟢 -346 B) 154.06 KB
/blog/2015/10/19/reactiflux-is-moving-to-discord 65.56 KB (🟢 -344 B) 149.78 KB
/blog/2015/10/28/react-v0.14.1 63.57 KB (🟢 -345 B) 147.79 KB
/blog/2015/11/02/react-v0.14.2 63.6 KB (🟢 -345 B) 147.82 KB
/blog/2015/11/18/react-v0.14.3 63.73 KB (🟢 -342 B) 147.94 KB
/blog/2015/12/04/react-js-conf-2016-diversity-scholarship 64.6 KB (🟢 -345 B) 148.81 KB
/blog/2015/12/16/ismounted-antipattern 64.2 KB (🟢 -345 B) 148.41 KB
/blog/2015/12/18/react-components-elements-and-instances 68.12 KB (🟢 -345 B) 152.33 KB
/blog/2015/12/29/react-v0.14.4 63.39 KB (🟢 -345 B) 147.61 KB
/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A 64.41 KB (🟢 -345 B) 148.63 KB
/blog/2016/01/12/discontinuing-ie8-support 63.22 KB (🟢 -345 B) 147.44 KB
/blog/2016/02/19/new-versioning-scheme 64.6 KB (🟢 -345 B) 148.82 KB
/blog/2016/03/07/react-v15-rc1 67.35 KB (🟢 -345 B) 151.57 KB
/blog/2016/03/16/react-v15-rc2 64.21 KB (🟢 -346 B) 148.43 KB
/blog/2016/03/29/react-v0.14.8 63.35 KB (🟢 -345 B) 147.57 KB
/blog/2016/04/07/react-v15 71.54 KB (🟢 -344 B) 155.75 KB
/blog/2016/04/08/react-v15.0.1 64.11 KB (🟢 -345 B) 148.32 KB
/blog/2016/07/11/introducing-reacts-error-code-system 63.82 KB (🟢 -346 B) 148.03 KB
/blog/2016/07/13/mixins-considered-harmful 71.97 KB (🟢 -343 B) 156.19 KB
/blog/2016/07/22/create-apps-with-no-configuration 67.3 KB (🟢 -345 B) 151.51 KB
/blog/2016/08/05/relay-state-of-the-state 67.34 KB (🟢 -345 B) 151.55 KB
/blog/2016/09/28/our-first-50000-stars 68.79 KB (🟢 -345 B) 153 KB
/blog/2016/11/16/react-v15.4.0 66.74 KB (🟢 -345 B) 150.95 KB
/blog/2017/04/07/react-v15.5.0 67.3 KB (🟢 -344 B) 151.52 KB
/blog/2017/05/18/whats-new-in-create-react-app 66.7 KB (🟢 -345 B) 150.92 KB
/blog/2017/06/13/react-v15.6.0 65.32 KB (🟢 -345 B) 149.54 KB
/blog/2017/07/26/error-handling-in-react-16 65.67 KB (🟢 -345 B) 149.89 KB
/blog/2017/09/08/dom-attributes-in-react-16 66.1 KB (🟢 -345 B) 150.32 KB
/blog/2017/09/25/react-v15.6.2 64.43 KB (🟢 -345 B) 148.65 KB
/blog/2017/09/26/react-v16.0 69.56 KB (🟢 -346 B) 153.78 KB
/blog/2017/11/28/react-v16.2.0-fragment-support 67.5 KB (🟢 -345 B) 151.71 KB
/blog/2017/12/07/introducing-the-react-rfc-process 64.02 KB (🟢 -345 B) 148.24 KB
/blog/2017/12/15/improving-the-repository-infrastructure 79.8 KB (🟢 -346 B) 164.02 KB
/blog/2018/03/01/sneak-peek-beyond-react-16 63.97 KB (🟢 -345 B) 148.19 KB
/blog/2018/03/27/update-on-async-rendering 69.22 KB (🟢 -345 B) 153.43 KB
/blog/2018/03/29/react-v-16-3 66.04 KB (🟢 -347 B) 150.25 KB
/blog/2018/05/23/react-v-16-4 66.18 KB (🟢 -345 B) 150.39 KB
/blog/2018/06/07/you-probably-dont-need-derived-state 69.83 KB (🟢 -346 B) 154.05 KB
/blog/2018/08/01/react-v-16-4-2 64.83 KB (🟢 -346 B) 149.04 KB
/blog/2018/09/10/introducing-the-react-profiler 66.44 KB (🟢 -346 B) 150.65 KB
/blog/2018/10/01/create-react-app-v2 66.91 KB (🟢 -345 B) 151.13 KB
/blog/2018/10/23/react-v-16-6 66.11 KB (🟢 -345 B) 150.33 KB
/blog/2018/11/13/react-conf-recap 63.83 KB (🟢 -346 B) 148.04 KB
/blog/2018/11/27/react-16-roadmap 70.02 KB (🟢 -345 B) 154.23 KB
/blog/2018/12/19/react-v-16-7 64.95 KB (🟢 -345 B) 149.16 KB
/blog/2019/02/06/react-v16.8.0 67.22 KB (🟢 -345 B) 151.43 KB
/blog/2019/02/23/is-react-translated-yet 66.78 KB (🟢 -346 B) 150.99 KB
/blog/2019/08/08/react-v16.9.0 69.71 KB (🟢 -346 B) 153.92 KB
/blog/2019/08/15/new-react-devtools 64.32 KB (🟢 -345 B) 148.53 KB
/blog/2019/10/22/react-release-channels 66.14 KB (🟢 -346 B) 150.35 KB
/blog/2019/11/06/building-great-user-experiences-with-concurrent-mode-and-suspense 70.83 KB (🟢 -345 B) 155.05 KB
/blog/2020/02/26/react-v16.13.0 67.05 KB (🟢 -346 B) 151.27 KB
/blog/2020/08/10/react-v17-rc 73.34 KB (🟢 -345 B) 157.55 KB
/blog/all 56.28 KB (🟢 -100 B) 140.5 KB
/community 52.83 KB (🟢 -345 B) 137.05 KB
/community/acknowledgements 54.02 KB (🟢 -345 B) 138.24 KB
/community/meet-the-team 54.72 KB (🟢 -345 B) 138.93 KB
/learn 57.79 KB (🟢 -345 B) 142 KB
/learn/add-react-to-a-website 57.91 KB (🟢 -345 B) 142.13 KB
/learn/adding-interactivity 59.48 KB (🟢 -346 B) 143.7 KB
/learn/choosing-the-state-structure 65.2 KB (🟢 -346 B) 149.41 KB
/learn/conditional-rendering 57.43 KB (🟢 -345 B) 141.65 KB
/learn/describing-the-ui 56.65 KB (🟢 -346 B) 140.86 KB
/learn/editor-setup 54.11 KB (🟢 -345 B) 138.33 KB
/learn/escape-hatches 52.16 KB (🟢 -345 B) 136.38 KB
/learn/extracting-state-logic-into-a-reducer 62.84 KB (🟢 -346 B) 147.05 KB
/learn/importing-and-exporting-components 55.83 KB (🟢 -345 B) 140.05 KB
/learn/installation 53.44 KB (🟢 -344 B) 137.66 KB
/learn/javascript-in-jsx-with-curly-braces 55.91 KB (🟢 -345 B) 140.12 KB
/learn/keeping-components-pure 60.04 KB (🟢 -346 B) 144.25 KB
/learn/managing-state 58.76 KB (🟢 -345 B) 142.97 KB
/learn/manipulating-the-dom-with-refs 61 KB (🟢 -345 B) 145.22 KB
/learn/passing-data-deeply-with-context 60.56 KB (🟢 -345 B) 144.78 KB
/learn/passing-props-to-a-component 59.61 KB (🟢 -345 B) 143.82 KB
/learn/preserving-and-resetting-state 63.58 KB (🟢 -345 B) 147.79 KB
/learn/queueing-a-series-of-state-updates 57.4 KB (🟢 -345 B) 141.62 KB
/learn/react-developer-tools 53.4 KB (🟢 -345 B) 137.61 KB
/learn/reacting-to-input-with-state 62.01 KB (🟢 -345 B) 146.23 KB
/learn/referencing-values-with-refs 58.92 KB (🟢 -344 B) 143.14 KB
/learn/render-and-commit 55.9 KB (🟢 -345 B) 140.12 KB
/learn/rendering-lists 59.99 KB (🟢 -345 B) 144.21 KB
/learn/responding-to-events 58.92 KB (🟢 -345 B) 143.14 KB
/learn/scaling-up-with-reducer-and-context 56.97 KB (🟢 -345 B) 141.19 KB
/learn/sharing-state-between-components 58.05 KB (🟢 -345 B) 142.27 KB
/learn/start-a-new-react-project 54.45 KB (🟢 -345 B) 138.67 KB
/learn/state-a-components-memory 63.13 KB (🟢 -345 B) 147.35 KB
/learn/state-as-a-snapshot 56.7 KB (🟢 -345 B) 140.92 KB
/learn/thinking-in-react 58.77 KB (🟢 -345 B) 142.98 KB
/learn/updating-arrays-in-state 61 KB (🟢 -344 B) 145.22 KB
/learn/updating-objects-in-state 60.73 KB (🟢 -345 B) 144.95 KB
/learn/writing-markup-with-jsx 56.15 KB (🟢 -345 B) 140.37 KB
/learn/your-first-component 56.74 KB (🟢 -345 B) 140.96 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@gaearon
Copy link
Member Author

gaearon commented May 25, 2022

Hmm maybe the Algolia stuff was getting tree-shaken well? Still kinda risky so good to remove the import.

@gaearon gaearon merged commit 4708fe6 into main May 25, 2022
@gaearon gaearon deleted the bundle branch May 25, 2022 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants