Skip to content

Add size-limit config#2173

Open
aryaemami59 wants to merge 1 commit into
reduxjs:masterfrom
aryaemami59:add-size-limit
Open

Add size-limit config#2173
aryaemami59 wants to merge 1 commit into
reduxjs:masterfrom
aryaemami59:add-size-limit

Conversation

@aryaemami59

Copy link
Copy Markdown
Member

This PR:

  • Adds size-limit config to monitor bundle size changes in preparation for any potential changes we'll have to make to migrate to React 19.

@codesandbox-ci

codesandbox-ci Bot commented May 15, 2024

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@timdorr

timdorr commented May 16, 2024

Copy link
Copy Markdown
Member

Honestly, I'm not a huge fan of these sorts of tools. They tend to be more annoying than helpful. Maybe we can limit it to just a react19 branch, so we don't have to tend to it after we complete that work?

Edit: Wait, don't we already have this? https://github.com/reduxjs/react-redux/blob/master/.github/workflows/size.yaml

@aryaemami59

Copy link
Copy Markdown
Member Author

@timdorr

Honestly, I'm not a huge fan of these sorts of tools. They tend to be more annoying than helpful.

That's fair, but size-limit does give us an idea of how the changes that we make impact our bundle sizes. And with the way I setup the config, it can keep track of every single named export, in every single package entry point, in both development and production builds. And the config is simple enough that I hope we'd be able to insert into any one of the redux packages and it should just work.

Edit: Wait, don't we already have this? https://github.com/reduxjs/react-redux/blob/master/.github/workflows/size.yaml

While preactjs/compressed-size-action does give us some info about bundle size changes, it looks like it's only looking at dist/cjs/index.js and dist/react-redux.legacy-esm.js. It also doesn't look at named exports, or different environments.

The idea is to have this here so that if we were ever to make a set of changes, we could use it to keep an eye on bundle sizes, it doesn't necessarily have to put a "limit" on anything.

@EskiMojo14

Copy link
Copy Markdown
Collaborator

yeah, while I don't think the concept of a size "limit" is very useful, I do find it useful to have visibility on how a given set of changes affects final bundle size.

@timdorr

timdorr commented May 17, 2024

Copy link
Copy Markdown
Member

Could this supplant our usage of compressed-size-action? That one hasn't been updated in a long time and causes some warnings in CI that will eventually turn into errors, so it's been on my radar to replace it.

@aryaemami59

Copy link
Copy Markdown
Member Author

I guess we could use https://github.com/EskiMojo14/size-limit-action, same thing we're doing with RTK.

@netlify

netlify Bot commented Jun 17, 2024

Copy link
Copy Markdown

Deploy Preview for react-redux-docs ready!

Name Link
🔨 Latest commit bdaffcd
🔍 Latest deploy log https://app.netlify.com/sites/react-redux-docs/deploys/66bfddc6a1b3d600086c804a
😎 Deploy Preview https://deploy-preview-2173--react-redux-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@markerikson

Copy link
Copy Markdown
Contributor

Yeah, I think we want to switch to the other size package for consistency.

@aryaemami59

Copy link
Copy Markdown
Member Author

The other size package?

@markerikson

Copy link
Copy Markdown
Contributor

@aryaemami59 aryaemami59 force-pushed the add-size-limit branch 17 times, most recently from c1b6e60 to 424ba39 Compare September 17, 2024 12:27

@scottpolo scottpolo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aryaemami59 aryaemami59 force-pushed the add-size-limit branch 2 times, most recently from 55722a5 to dec351d Compare October 26, 2024 12:19
@aryaemami59 aryaemami59 force-pushed the add-size-limit branch 3 times, most recently from 79a6b68 to 00f344a Compare November 11, 2024 23:29
@aryaemami59 aryaemami59 force-pushed the add-size-limit branch 2 times, most recently from 4abd8a3 to 8b5ecee Compare December 31, 2024 01:52
@timdorr

timdorr commented Dec 31, 2024

Copy link
Copy Markdown
Member

Can we just merge this at this point? I don't need another resolution for 2025 😂

@markerikson

Copy link
Copy Markdown
Contributor

@aryaemami59 same question as with the RTK PR - what does the actual output look like atm?

@aryaemami59 aryaemami59 marked this pull request as ready for review February 28, 2025 12:23
@aryaemami59 aryaemami59 force-pushed the add-size-limit branch 2 times, most recently from d9e338c to 9210fde Compare March 16, 2025 19:33
@aryaemami59 aryaemami59 force-pushed the add-size-limit branch 2 times, most recently from 5ebfd08 to ba4faa6 Compare April 27, 2025 12:13
@aryaemami59 aryaemami59 self-assigned this Mar 18, 2026
@aryaemami59 aryaemami59 added Tooling Updates and improvements to internal development tools, scripts, and automation. maintenance labels Mar 18, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/react-redux@2173 -D
yarn add https://pkg.pr.new/react-redux@2173.tgz -D
pnpm add https://pkg.pr.new/react-redux@2173.tgz -D
bun add https://pkg.pr.new/react-redux@2173.tgz -D

commit: 2c0cf09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tooling Updates and improvements to internal development tools, scripts, and automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants