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

Change the vite chunk filename hash usage #2224

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

twk3
Copy link
Contributor

@twk3 twk3 commented Jan 13, 2024

Summary

  • Change to more closely match the .chunk syntax we use with webpack
  • This should improve an issue with our size compare as well

Details

The improvement for size compare is that our github action is stripping out the hashes before passing the size compare, but was based on the period.

We have the additional difficulty here of rollup using base64 hashes, which can include _- which complicates our ability to just strip out what we want.

This should improve the output, but there likely is a few more tweaks to be made, as our current vite stats seem to be missing the css and font sizes, which were previously present in this action.

Test

Because this action uses pull_request_target only the action from master is run. In order to test the changes here I opened a sibling PR using just pull_reqest.

You can see the test comment here: #2225 (comment)

and if you expand the View detailed bundle breakdown you can see the new naming at work in the Added section vs the current master naming at work in the Removed section.

- Change to more closely match the . syntax we use with webpack
- This shoudl fix some issues with our size compare as well
Copy link

netlify bot commented Jan 13, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit c09a93f
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/65a2f5a512116a000812d79a
😎 Deploy Preview https://deploy-preview-2224.demo.actualbudget.org
📱 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.

Copy link
Contributor

github-actions bot commented Jan 13, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
10 5.08 MB → 5.08 MB (-1.29 kB) -0.02%
Changeset
File Δ Size
src/polyfills.ts 📈 +6 B (+1.77%) 339 B → 345 B
src/components/responsive/index.tsx 📈 +12 B (+1.73%) 695 B → 707 B
src/components/reports/index.tsx 📈 +6 B (+1.26%) 476 B → 482 B
src/components/Background.tsx 📈 +6 B (+0.35%) 1.65 kB → 1.66 kB
node_modules/absurd-sql/dist/indexeddb-main-thread.js 📈 +6 B (+0.29%) 2.04 kB → 2.05 kB
src/components/transactions/SelectedTransactions.jsx 📉 -51 B (-1.04%) 4.79 kB → 4.74 kB
src/components/schedules/ScheduleDetails.jsx 📉 -467 B (-1.67%) 27.24 kB → 26.78 kB
src/components/Modals.tsx 📉 -145 B (-1.72%) 8.22 kB → 8.08 kB
src/components/schedules/ScheduleLink.tsx 📉 -697 B (-23.93%) 2.84 kB → 2.16 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
static/js/index.8KKFG0yA.js 0 B → 2.63 MB (+2.63 MB) -
static/js/ReportRouter.fc04Od-K.chunk.js 0 B → 1.95 MB (+1.95 MB) -
static/js/wide.wjQqe7wR.chunk.js 0 B → 236.3 kB (+236.3 kB) -
static/js/BackgroundImage.pRU-7ZUA.chunk.js 0 B → 122.29 kB (+122.29 kB) -
static/js/narrow.b7pS7LfI.chunk.js 0 B → 82.17 kB (+82.17 kB) -
static/js/FiltersMenu.im5Mlk9w.chunk.js 0 B → 28.92 kB (+28.92 kB) -
static/js/resize-observer.6FaCDon1.chunk.js 0 B → 18.37 kB (+18.37 kB) -
static/js/indexeddb-main-thread-worker-e59fee74.bhyX5Ad6.chunk.js 0 B → 13.5 kB (+13.5 kB) -
static/js/BalanceTooltip.FuxaieAz.chunk.js 0 B → 6.07 kB (+6.07 kB) -
static/js/ButtonLink.T3D_QxEU.chunk.js 0 B → 379 B (+379 B) -

Removed

Asset File Size % Changed
static/js/index-dF4_yrex.js 2.63 MB → 0 B (-2.63 MB) -100%
static/js/ReportRouter-gSSaNa0n.js 1.95 MB → 0 B (-1.95 MB) -100%
static/js/wide-cFb56fDi.js 236.35 kB → 0 B (-236.35 kB) -100%
static/js/BackgroundImage-1Yws_2oV.js 122.29 kB → 0 B (-122.29 kB) -100%
static/js/narrow-3-QpUkOh.js 82.17 kB → 0 B (-82.17 kB) -100%
static/js/FiltersMenu-VztzRwUc.js 28.92 kB → 0 B (-28.92 kB) -100%
static/js/resize-observer-6FaCDon1.js 18.37 kB → 0 B (-18.37 kB) -100%
static/js/indexeddb-main-thread-worker-e59fee74-bhyX5Ad6.js 13.5 kB → 0 B (-13.5 kB) -100%
static/js/BalanceTooltip-m6XuKOox.js 6.07 kB → 0 B (-6.07 kB) -100%
static/js/ButtonLink-N_7fj7Zs.js 379 B → 0 B (-379 B) -100%

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

No assets were unchanged

Copy link
Contributor

github-actions bot commented Jan 13, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.23 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.23 MB 0%

@twk3 twk3 changed the title Change the vite chunk filename hash usage [WIP]Change the vite chunk filename hash usage Jan 13, 2024
@twk3 twk3 force-pushed the twk3/fix-vite-chunk-hash branch from afd1515 to 1bb93a5 Compare January 13, 2024 19:38
@twk3 twk3 force-pushed the twk3/fix-vite-chunk-hash branch from 1bb93a5 to 78bb827 Compare January 13, 2024 19:54
@twk3 twk3 mentioned this pull request Jan 13, 2024
@twk3 twk3 changed the title [WIP]Change the vite chunk filename hash usage Change the vite chunk filename hash usage Jan 13, 2024
@twk3 twk3 requested a review from j-f1 January 13, 2024 20:48
@twk3 twk3 merged commit a8b42bc into master Jan 15, 2024
19 checks passed
@twk3 twk3 deleted the twk3/fix-vite-chunk-hash branch January 15, 2024 17:47
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Jan 15, 2024
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
* Change the vite chunk filename hash usage

- Change to more closely match the . syntax we use with webpack
- This should fix some issues with our size compare as well
* Account for chunks being base64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants