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

Webpack + SWC Loader #1650

Merged
merged 17 commits into from
Sep 5, 2023
Merged

Conversation

joel-jeremy
Copy link
Contributor

@joel-jeremy joel-jeremy commented Sep 4, 2023

Related to #656

@netlify
Copy link

netlify bot commented Sep 4, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit f8d0075
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/64f774be69c1d6000838bdb4
😎 Deploy Preview https://deploy-preview-1650.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.

@trafico-bot trafico-bot bot added the 🚧 WIP label Sep 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

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
15 → 16 2.27 MB → 2.46 MB (+193.75 kB) +8.35%
Changeset (largest 100 files by percent change)
File Δ Size
../../node_modules/tslib/tslib.es6.mjs 🆕 +14.21 kB 0 B → 14.21 kB
css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[4].use[2]!../../node_modules/source-map-loader/dist/cjs.js!../../node_modules/pikaday/css/pikaday.css 🆕 +4.46 kB 0 B → 4.46 kB
css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[4].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[4].use[2]!../../node_modules/source-map-loader/dist/cjs.js!../../node_modules/@reach/listbox/styles.css 🆕 +2.13 kB 0 B → 2.13 kB
css ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[6].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[6].use[2]!../../node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[6].use[3]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[6].use[4]!./src/fonts.scss 🆕 +1004 B 0 B → 1004 B
src/components/modals/CreateLocalAccount.js 📈 +5.27 kB (+154.54%) 3.41 kB → 8.68 kB
src/components/budget/rollover/BudgetSummary.tsx 📈 +12.41 kB (+146.10%) 8.49 kB → 20.9 kB
src/components/budget/SidebarGroup.js 📈 +4.42 kB (+144.63%) 3.06 kB → 7.48 kB
src/components/schedules/EditSchedule.js 📈 +22.47 kB (+141.76%) 15.85 kB → 38.32 kB
src/components/reports/CategorySelector.tsx 📈 +4.17 kB (+140.05%) 2.98 kB → 7.15 kB
src/components/UpdateNotification.tsx 📈 +2.81 kB (+139.54%) 2.01 kB → 4.82 kB
src/components/modals/CloseAccount.js 📈 +5.74 kB (+139.49%) 4.12 kB → 9.86 kB
src/components/reports/Overview.js 📈 +10.29 kB (+135.67%) 7.58 kB → 17.87 kB
src/components/modals/FixEncryptionKey.js 📈 +4.39 kB (+135.44%) 3.24 kB → 7.64 kB
src/components/modals/CreateEncryptionKey.js 📈 +5.99 kB (+134.08%) 4.47 kB → 10.46 kB
src/components/transactions/SelectedTransactions.js 📈 +3.8 kB (+133.31%) 2.85 kB → 6.66 kB
src/components/budget/BudgetTotals.js 📈 +2.63 kB (+129.03%) 2.04 kB → 4.68 kB
src/components/budget/SidebarCategory.js 📈 +3.56 kB (+124.26%) 2.87 kB → 6.43 kB
src/components/accounts/Header.js 📈 +10.33 kB (+123.53%) 8.36 kB → 18.7 kB
src/components/FinancesApp.tsx 📈 +9.01 kB (+123.47%) 7.3 kB → 16.31 kB
src/components/modals/CreateAccount.js 📈 +3.81 kB (+122.76%) 3.1 kB → 6.91 kB
src/components/filters/SavedFilters.js 📈 +7.32 kB (+122.08%) 5.99 kB → 13.31 kB
src/components/modals/BudgetSummary.js 📈 +3.05 kB (+120.18%) 2.54 kB → 5.58 kB
src/components/modals/MergeUnusedPayees.js 📈 +5.06 kB (+120.00%) 4.21 kB → 9.27 kB
src/components/budget/report/BudgetSummary.tsx 📈 +10.08 kB (+119.08%) 8.46 kB → 18.54 kB
src/components/filters/FiltersMenu.js 📈 +12.72 kB (+118.67%) 10.72 kB → 23.45 kB
src/components/manager/Import.js 📈 +2.56 kB (+118.24%) 2.17 kB → 4.73 kB
src/components/budget/report/components.tsx 📈 +8.49 kB (+116.86%) 7.27 kB → 15.76 kB
src/components/select/RecurringSchedulePicker.js 📈 +10.62 kB (+116.39%) 9.13 kB → 19.75 kB
src/icons/Loading.js 📈 +1.1 kB (+114.91%) 979 B → 2.05 kB
src/components/modals/countries.js 📈 +934 B (+114.04%) 819 B → 1.71 kB
src/components/manager/ManagementApp.js 📈 +5.57 kB (+113.55%) 4.91 kB → 10.48 kB
src/components/accounts/MobileAccountDetails.js 📈 +3.86 kB (+112.46%) 3.43 kB → 7.29 kB
src/components/budget/rollover/rollover-components.tsx 📈 +11.01 kB (+112.40%) 9.79 kB → 20.8 kB
src/components/manager/DeleteFile.js 📈 +3 kB (+108.89%) 2.76 kB → 5.76 kB
src/components/settings/Format.tsx 📈 +3.7 kB (+108.50%) 3.41 kB → 7.11 kB
src/components/modals/LoadBackup.js 📈 +3.25 kB (+107.67%) 3.02 kB → 6.27 kB
src/components/Notifications.tsx 📈 +4.24 kB (+107.13%) 3.96 kB → 8.2 kB
src/components/modals/ConfirmCategoryDelete.js 📈 +2.75 kB (+105.88%) 2.59 kB → 5.34 kB
src/components/reports/graphs/NetWorthGraph.tsx 📈 +2.08 kB (+105.28%) 1.98 kB → 4.06 kB
src/components/reports/graphs/common.tsx 📈 +1.42 kB (+104.62%) 1.35 kB → 2.77 kB
src/components/rules/RuleRow.tsx 📈 +2.75 kB (+103.91%) 2.65 kB → 5.4 kB
src/hooks/useMergedRefs.js 📈 +251 B (+103.29%) 243 B → 494 B
src/components/modals/EditRule.js 📈 +18.27 kB (+100.87%) 18.11 kB → 36.38 kB
src/components/transactions/SimpleTransactionsTable.js 📈 +4.39 kB (+100.27%) 4.37 kB → 8.76 kB
src/components/util/GenericInput.js 📈 +3.42 kB (+99.55%) 3.44 kB → 6.86 kB
src/components/sidebar/Account.tsx 📈 +2.32 kB (+98.63%) 2.35 kB → 4.66 kB
src/components/transactions/MobileTransaction.js 📈 +23.86 kB (+96.23%) 24.8 kB → 48.66 kB
src/components/modals/GoCardlessExternalMsg.js 📈 +6.44 kB (+96.03%) 6.71 kB → 13.16 kB
src/components/Background.tsx 📈 +1.01 kB (+94.95%) 1.06 kB → 2.07 kB
src/components/GlobalKeys.tsx 📈 +559 B (+94.59%) 591 B → 1.12 kB
src/components/accounts/Reconcile.js 📈 +2.98 kB (+94.53%) 3.16 kB → 6.14 kB
src/icons/v2/NavigationMenu.js 📈 +549 B (+93.37%) 588 B → 1.11 kB
src/components/reports/graphs/CashFlowGraph.tsx 📈 +1.32 kB (+93.26%) 1.42 kB → 2.74 kB
src/components/common/Modal.tsx 📈 +4.83 kB (+92.51%) 5.23 kB → 10.06 kB
src/components/reports/graphs/cash-flow-spreadsheet.tsx 📈 +4.03 kB (+91.96%) 4.39 kB → 8.42 kB
src/components/reports/CashFlow.js 📈 +4.02 kB (+91.94%) 4.37 kB → 8.39 kB
src/components/common/Menu.tsx 📈 +2.66 kB (+91.18%) 2.92 kB → 5.59 kB
src/components/reports/Header.js 📈 +3.06 kB (+90.49%) 3.38 kB → 6.43 kB
src/components/modals/ImportTransactions.js 📈 +19.42 kB (+90.33%) 21.5 kB → 40.93 kB
src/components/schedules/SchedulesTable.js 📈 +5.94 kB (+88.99%) 6.68 kB → 12.62 kB
src/components/reports/graphs/CategorySpendingGraph.tsx 📈 +1.29 kB (+88.50%) 1.46 kB → 2.75 kB
src/components/modals/PlaidExternalMsg.js 📈 +2.67 kB (+86.94%) 3.07 kB → 5.73 kB
../loot-core/src/shared/rules.ts 📈 +3.23 kB (+86.69%) 3.73 kB → 6.96 kB
src/components/manager/ImportActual.tsx 📈 +2.18 kB (+86.25%) 2.53 kB → 4.71 kB
../loot-core/src/client/shared-listeners.ts 📈 +4.82 kB (+86.08%) 5.6 kB → 10.41 kB
src/components/manager/ImportYNAB4.tsx 📈 +1.95 kB (+86.03%) 2.27 kB → 4.21 kB
src/components/modals/GoCardlessInitialise.tsx 📈 +1.92 kB (+85.53%) 2.24 kB → 4.16 kB
src/components/autocomplete/CategoryAutocomplete.tsx 📈 +3.69 kB (+84.76%) 4.35 kB → 8.04 kB
src/components/manager/subscribe/ConfirmPasswordForm.tsx 📈 +1.38 kB (+84.44%) 1.63 kB → 3.01 kB
src/components/schedules/index.tsx 📈 +1.82 kB (+84.22%) 2.16 kB → 3.98 kB
src/components/manager/BudgetList.js 📈 +5.18 kB (+84.00%) 6.17 kB → 11.34 kB
src/components/manager/ConfigServer.tsx 📈 +3.25 kB (+82.54%) 3.94 kB → 7.2 kB
src/components/budget/BudgetCategories.js 📈 +4.7 kB (+82.45%) 5.7 kB → 10.41 kB
src/components/rules/Value.tsx 📈 +2.87 kB (+82.23%) 3.49 kB → 6.36 kB
src/components/reports/graphs/net-worth-spreadsheet.tsx 📈 +2.55 kB (+82.02%) 3.11 kB → 5.65 kB
src/components/common/InlineField.tsx 📈 +350 B (+81.02%) 432 B → 782 B
src/components/BankSyncStatus.tsx 📈 +1.01 kB (+80.91%) 1.24 kB → 2.25 kB
src/components/manager/WelcomeScreen.js 📈 +1.7 kB (+80.61%) 2.11 kB → 3.8 kB
src/components/budget/BudgetTable.js 📈 +4.72 kB (+80.61%) 5.85 kB → 10.57 kB
src/components/manager/ImportYNAB5.tsx 📈 +1.87 kB (+79.58%) 2.35 kB → 4.22 kB
src/components/sidebar/Sidebar.tsx 📈 +2.01 kB (+78.81%) 2.55 kB → 4.56 kB
src/components/manager/subscribe/Login.tsx 📈 +1.84 kB (+78.72%) 2.34 kB → 4.18 kB
src/components/budget/MobileBudgetTable.js 📈 +15.79 kB (+78.65%) 20.07 kB → 35.86 kB
src/components/sidebar/Item.tsx 📈 +993 B (+78.50%) 1.24 kB → 2.21 kB
src/components/settings/index.tsx 📈 +3.74 kB (+77.97%) 4.79 kB → 8.53 kB
src/components/MobileWebMessage.tsx 📈 +1.75 kB (+76.99%) 2.27 kB → 4.01 kB
src/components/autocomplete/PayeeAutocomplete.js 📈 +6.45 kB (+76.78%) 8.39 kB → 14.84 kB
src/components/schedules/PostsOfflineNotification.js 📈 +1.72 kB (+76.66%) 2.24 kB → 3.96 kB
src/components/accounts/AccountSyncCheck.js 📈 +2.47 kB (+76.41%) 3.23 kB → 5.7 kB
src/components/payees/index.js 📈 +7.89 kB (+75.61%) 10.43 kB → 18.32 kB
src/components/schedules/DiscoverSchedules.js 📈 +3.51 kB (+75.46%) 4.65 kB → 8.16 kB
src/components/ManageRules.js 📈 +4.85 kB (+75.14%) 6.46 kB → 11.32 kB
src/hooks/useSelected.tsx 📈 +4.43 kB (+74.74%) 5.93 kB → 10.37 kB
src/components/budget/MonthPicker.js 📈 +2.2 kB (+73.85%) 2.98 kB → 5.17 kB
src/components/modals/EditField.js 📈 +2.71 kB (+72.51%) 3.73 kB → 6.44 kB
src/components/reports/chart-theme.js 📈 +1.14 kB (+72.46%) 1.57 kB → 2.7 kB
src/components/schedules/LinkSchedule.tsx 📈 +1.31 kB (+72.40%) 1.8 kB → 3.11 kB
src/components/modals/SelectLinkedAccounts.js 📈 +3.25 kB (+71.97%) 4.51 kB → 7.76 kB
src/components/common/LinkButton.tsx 📈 +408 B (+71.58%) 570 B → 978 B
src/components/Titlebar.tsx 📈 +5.85 kB (+71.47%) 8.19 kB → 14.04 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
static/js/678.chunk.js 0 B → 420.74 kB (+420.74 kB) -
static/js/713.chunk.js 0 B → 156.56 kB (+156.56 kB) -
static/js/231.chunk.js 0 B → 117.37 kB (+117.37 kB) -
static/js/473.chunk.js 0 B → 13 kB (+13 kB) -
static/js/389.chunk.js 0 B → 12.76 kB (+12.76 kB) -

Removed

Asset File Size % Changed
static/js/171.chunk.js 396.24 kB → 0 B (-396.24 kB) -100%
static/js/894.chunk.js 145.89 kB → 0 B (-145.89 kB) -100%
static/js/383.chunk.js 117.35 kB → 0 B (-117.35 kB) -100%
static/js/969.chunk.js 12.94 kB → 0 B (-12.94 kB) -100%

Bigger

Asset File Size % Changed
static/js/main.js 968.16 kB → 1.11 MB (+164.45 kB) +16.99%
static/css/main.css 5.82 kB → 7.41 kB (+1.6 kB) +27.43%
static/js/narrow-components.chunk.js 24.48 kB → 25.3 kB (+840 B) +3.35%
static/js/resize-observer-polyfill.chunk.js 8.12 kB → 8.88 kB (+784 B) +9.43%
asset-manifest.json 1.92 kB → 2.07 kB (+148 B) +7.51%

Smaller

Asset File Size % Changed
static/js/reports.chunk.js 40.54 kB → 28.65 kB (-11.89 kB) -29.33%
static/js/wide-components.chunk.js 135.53 kB → 125.44 kB (-10.09 kB) -7.45%
static/media/browser-server.js 963 B → 903 B (-60 B) -6.23%

Unchanged

Asset File Size % Changed
static/media/Inter-italic.var.woff2 239.29 kB 0%
static/media/Inter-roman.var.woff2 221.86 kB 0%
index.html 1.66 kB 0%

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

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
2 2.07 MB → 2.22 MB (+150.52 kB) +7.10%
Changeset (largest 100 files by percent change)
File Δ Size
node_modules/has-proto/index.js 🆕 +197 B 0 B → 197 B
packages/node-libofx/libofx.web.js 📈 +7.34 MB (+720.77%) 1.02 MB → 8.36 MB
packages/node-libofx/index.js 📈 +4.75 kB (+335.45%) 1.42 kB → 6.17 kB
packages/api/methods.js 📈 +8.07 kB (+203.60%) 3.96 kB → 12.03 kB
packages/crdt/src/crdt/timestamp.ts 📈 +8.93 kB (+108.84%) 8.21 kB → 17.14 kB
packages/crdt/src/crdt/merkle.ts 📈 +3.4 kB (+80.16%) 4.24 kB → 7.64 kB
node_modules/which-typed-array/index.js 📈 +649 B (+37.86%) 1.67 kB → 2.31 kB
packages/loot-core/src/server/accounts/title/lower-case.ts 📈 +331 B (+37.79%) 876 B → 1.18 kB
packages/loot-core/src/server/accounts/title/specials.ts 📈 +79 B (+36.57%) 216 B → 295 B
packages/node-libofx/ffi.js 📈 +423 B (+35.13%) 1.18 kB → 1.59 kB
packages/loot-core/src/server/accounts/transaction-rules.ts 📈 +5.92 kB (+28.82%) 20.56 kB → 26.49 kB
packages/loot-core/src/shared/rules.ts 📈 +1.55 kB (+28.59%) 5.41 kB → 6.96 kB
packages/loot-core/src/shared/query.ts 📈 +765 B (+27.23%) 2.74 kB → 3.49 kB
packages/loot-core/src/shared/schedules.ts 📈 +1.54 kB (+24.11%) 6.37 kB → 7.91 kB
node_modules/adm-zip/util/constants.js 📈 +1.2 kB (+23.86%) 5.03 kB → 6.22 kB
node_modules/adm-zip/methods/inflater.js 📈 +179 B (+23.65%) 757 B → 936 B
packages/loot-core/src/platform/server/connection/index.web.ts 📈 +647 B (+21.73%) 2.91 kB → 3.54 kB
packages/loot-core/src/server/budget/goaltemplates.ts 📈 +5.66 kB (+21.50%) 26.32 kB → 31.98 kB
node_modules/adm-zip/methods/deflater.js 📈 +176 B (+20.83%) 845 B → 1021 B
packages/loot-core/src/server/accounts/qif2json.ts 📈 +449 B (+20.27%) 2.16 kB → 2.6 kB
packages/loot-core/src/server/accounts/rules.ts 📈 +3.86 kB (+20.22%) 19.1 kB → 22.96 kB
packages/loot-core/src/platform/server/fs/path-join.web.ts 📈 +549 B (+20.15%) 2.66 kB → 3.2 kB
packages/loot-core/src/shared/async.ts 📈 +221 B (+19.75%) 1.09 kB → 1.31 kB
packages/loot-core/src/mocks/budget.ts 📈 +3.93 kB (+19.36%) 20.31 kB → 24.25 kB
node_modules/adm-zip/zipEntry.js 📈 +1.89 kB (+19.34%) 9.79 kB → 11.68 kB
node_modules/adm-zip/zipFile.js 📈 +2.14 kB (+19.09%) 11.19 kB → 13.33 kB
packages/loot-core/src/server/errors.ts 📈 +208 B (+18.96%) 1.07 kB → 1.27 kB
packages/loot-core/src/server/aql/compiler.ts 📈 +5.44 kB (+18.87%) 28.86 kB → 34.3 kB
node_modules/adm-zip/adm-zip.js 📈 +4.78 kB (+18.71%) 25.56 kB → 30.34 kB
packages/loot-core/src/server/spreadsheet/spreadsheet.ts 📈 +1.85 kB (+18.17%) 10.19 kB → 12.05 kB
node_modules/adm-zip/headers/mainHeader.js 📈 +676 B (+17.89%) 3.69 kB → 4.35 kB
packages/loot-core/src/server/sync/migrate.ts 📈 +171 B (+17.85%) 958 B → 1.1 kB
node_modules/adm-zip/util/fattr.js 📈 +297 B (+17.83%) 1.63 kB → 1.92 kB
packages/loot-core/src/server/aql/schema/index.ts 📈 +1.83 kB (+17.71%) 10.35 kB → 12.19 kB
node_modules/adm-zip/headers/entryHeader.js 📈 +1.66 kB (+17.60%) 9.43 kB → 11.09 kB
packages/loot-core/migrations/1632571489012_remove_cache.js 📈 +536 B (+17.13%) 3.06 kB → 3.58 kB
packages/loot-core/src/shared/transactions.ts 📈 +1.16 kB (+16.97%) 6.84 kB → 8 kB
packages/loot-core/src/server/aql/views.ts 📈 +279 B (+16.93%) 1.61 kB → 1.88 kB
packages/loot-core/src/platform/server/indexeddb/index.web.ts 📈 +748 B (+16.60%) 4.4 kB → 5.13 kB
packages/loot-core/src/server/schedules/find-schedules.ts 📈 +1.63 kB (+16.59%) 9.8 kB → 11.43 kB
packages/loot-core/src/server/app.ts 📈 +257 B (+16.36%) 1.53 kB → 1.79 kB
node_modules/function-bind/implementation.js 📈 +204 B (+16.20%) 1.23 kB → 1.43 kB
packages/loot-core/src/server/models.ts 📈 +594 B (+15.66%) 3.7 kB → 4.28 kB
packages/loot-core/src/server/importers/index.ts 📈 +173 B (+15.63%) 1.08 kB → 1.25 kB
packages/loot-core/src/server/db/sort.ts 📈 +252 B (+15.58%) 1.58 kB → 1.83 kB
packages/loot-core/src/server/spreadsheet/globals.ts 📈 +35 B (+15.35%) 228 B → 263 B
packages/loot-core/src/server/api-models.ts 📈 +297 B (+15.18%) 1.91 kB → 2.2 kB
packages/loot-core/src/server/db/util.ts 📈 +121 B (+14.72%) 822 B → 943 B
packages/loot-core/src/server/budget/report.ts 📈 +484 B (+14.64%) 3.23 kB → 3.7 kB
packages/loot-core/src/server/budget/cleanup-template.ts 📈 +684 B (+14.18%) 4.71 kB → 5.38 kB
packages/loot-core/src/server/spreadsheet/graph-data-structure.ts 📈 +368 B (+14.08%) 2.55 kB → 2.91 kB
packages/loot-core/src/server/spreadsheet/util.ts 📈 +41 B (+13.90%) 295 B → 336 B
packages/loot-core/src/server/accounts/export-to-csv.ts 📈 +322 B (+13.73%) 2.29 kB → 2.6 kB
node_modules/adm-zip/util/utils.js 📈 +924 B (+13.51%) 6.68 kB → 7.58 kB
packages/loot-core/src/server/accounts/parse-file.ts 📈 +572 B (+13.35%) 4.18 kB → 4.74 kB
node_modules/pako/lib/zlib/constants.js 📈 +271 B (+13.28%) 1.99 kB → 2.26 kB
packages/loot-core/src/server/undo.ts 📈 +810 B (+13.16%) 6.01 kB → 6.8 kB
node_modules/adm-zip/util/fileSystem.js 📈 +41 B (+13.14%) 312 B → 353 B
packages/loot-core/src/server/sync/index.ts 📈 +2.69 kB (+13.12%) 20.47 kB → 23.16 kB
packages/loot-core/src/server/importers/ynab5.ts 📈 +1.08 kB (+13.10%) 8.25 kB → 9.33 kB
packages/loot-core/src/server/accounts/sync.ts 📈 +3.46 kB (+13.10%) 26.43 kB → 29.9 kB
packages/loot-core/src/server/budget/rollover.ts 📈 +711 B (+13.04%) 5.33 kB → 6.02 kB
packages/loot-core/src/server/main.ts 📈 +7.41 kB (+12.66%) 58.51 kB → 65.92 kB
packages/loot-core/src/server/importers/ynab4.ts 📈 +1.36 kB (+12.58%) 10.84 kB → 12.2 kB
packages/loot-core/src/server/accounts/link.ts 📈 +450 B (+12.41%) 3.54 kB → 3.98 kB
packages/loot-core/src/server/post.ts 📈 +247 B (+12.10%) 1.99 kB → 2.23 kB
packages/loot-core/src/server/prefs.ts 📈 +258 B (+12.01%) 2.1 kB → 2.35 kB
packages/loot-core/src/platform/server/sqlite/index.web.ts 📈 +546 B (+11.76%) 4.53 kB → 5.07 kB
node_modules/memoize-one/dist/memoize-one.esm.js 📈 +142 B (+11.68%) 1.19 kB → 1.33 kB
packages/loot-core/src/server/sync/encoder.ts 📈 +397 B (+11.64%) 3.33 kB → 3.72 kB
packages/loot-core/src/server/schedules/app.ts 📈 +1.75 kB (+11.63%) 15.06 kB → 16.81 kB
node_modules/memfs/lib/volume.js 📈 +8.38 kB (+11.55%) 72.57 kB → 80.95 kB
packages/loot-core/src/platform/server/asyncStorage/index.web.ts 📈 +328 B (+11.50%) 2.79 kB → 3.11 kB
packages/loot-core/src/server/budget/base.ts 📈 +1.5 kB (+11.43%) 13.13 kB → 14.64 kB
packages/loot-core/src/server/aql/schema-helpers.ts 📈 +602 B (+11.29%) 5.21 kB → 5.8 kB
packages/loot-core/src/shared/util.ts 📈 +903 B (+11.03%) 8 kB → 8.88 kB
packages/loot-core/src/server/accounts/transfer.ts 📈 +588 B (+10.98%) 5.23 kB → 5.8 kB
packages/loot-core/src/server/cloud-storage.ts 📈 +1.18 kB (+10.89%) 10.86 kB → 12.04 kB
node_modules/for-each/index.js 📈 +171 B (+10.75%) 1.55 kB → 1.72 kB
packages/loot-core/src/server/accounts/transactions.ts 📈 +507 B (+10.50%) 4.71 kB → 5.21 kB
packages/loot-core/src/server/encryption-internals.web.ts 📈 +272 B (+10.19%) 2.61 kB → 2.87 kB
packages/loot-core/src/server/budget/util.ts 📈 +53 B (+10.17%) 521 B → 574 B
node_modules/memfs/lib/constants.js 📈 +91 B (+9.80%) 929 B → 1020 B
node_modules/memfs/lib/node.js 📈 +1.14 kB (+9.72%) 11.76 kB → 12.9 kB
packages/loot-core/src/server/server-config.ts 📈 +70 B (+9.58%) 731 B → 801 B
packages/loot-core/src/server/filters/app.ts 📈 +405 B (+9.14%) 4.33 kB → 4.72 kB
packages/loot-core/src/server/api.ts 📈 +1.4 kB (+9.01%) 15.51 kB → 16.91 kB
packages/loot-core/src/server/encryption.ts 📈 +152 B (+8.93%) 1.66 kB → 1.81 kB
node_modules/memfs/lib/promises.js 📈 +508 B (+8.92%) 5.56 kB → 6.06 kB
packages/loot-core/src/server/tools/app.ts 📈 +175 B (+8.80%) 1.94 kB → 2.11 kB
packages/loot-core/src/server/sheet.ts 📈 +526 B (+8.67%) 5.93 kB → 6.44 kB
packages/loot-core/src/platform/server/log/index.web.ts 📈 +13 B (+8.67%) 150 B → 163 B
packages/loot-core/src/server/sync/reset.ts 📈 +244 B (+8.65%) 2.75 kB → 2.99 kB
packages/loot-core/src/server/update.ts 📈 +69 B (+8.55%) 807 B → 876 B
packages/loot-core/src/server/budget/actions.ts 📈 +685 B (+7.99%) 8.38 kB → 9.05 kB
packages/loot-core/src/server/db/index.ts 📈 +1.23 kB (+7.79%) 15.8 kB → 17.03 kB
node_modules/memfs/lib/process.js 📈 +92 B (+7.65%) 1.17 kB → 1.26 kB
packages/loot-core/src/server/accounts/payees.ts 📈 +68 B (+7.52%) 904 B → 972 B
packages/loot-core/src/server/migrate/migrations.ts 📈 +286 B (+7.49%) 3.73 kB → 4.01 kB
node_modules/process/browser.js 📈 +370 B (+7.33%) 4.93 kB → 5.29 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.09 MB → 1.23 MB (+140.1 kB) +12.56%
xfo.xfo.kcab.worker.js 1004.04 kB → 1014.46 kB (+10.42 kB) +1.04%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

@joel-jeremy
Copy link
Contributor Author

joel-jeremy commented Sep 4, 2023

-75.43% reduction in build time

Current build time: time yarn build:browser

image

SWC build time: time yarn build:browser

image

@MatissJanis
Copy link
Member

Really cool. react-scripts was deprecated ages ago. It's nice to see us moving to something more modern.

Let me know when you want me to review this.

@joel-jeremy joel-jeremy mentioned this pull request Sep 4, 2023
@joel-jeremy
Copy link
Contributor Author

loot-core tests: (-44% in execution time)

ts-jest execution time

image

SWC execution time

image

crdt tests (-88.2% in execution time)

ts-jest execution time

image

SWC execution time

image

For some reason crdt tests fail in local but succeeds in CI. I haven't looked into why that is.

@joel-jeremy joel-jeremy changed the title [WIP] Webpack + SWC Loader Webpack + SWC Loader Sep 5, 2023
@joel-jeremy
Copy link
Contributor Author

joel-jeremy commented Sep 5, 2023

@MatissJanis @shall0pass @trevdor This is ready for review :) There seem to be an increase in bundle size due to the switch but build and test execution time has dramatically improved.

Aside: It looks like github action is not caching packages?

@MatissJanis
Copy link
Member

Just pushed a small patch for electron app I found while testing this PR. Hope you don't mind.

Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

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

Did not spot any significant issue! Amazing job here :)

@@ -40,7 +43,6 @@
"memoize-one": "^6.0.0",
"pikaday": "1.8.0",
"react": "18.2.0",
"react-app-rewired": "^2.2.1",
Copy link
Member

Choose a reason for hiding this comment

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

💬 suggestion:react-scripts can also be removed IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Craco still uses react-scripts under the hood I believe: https://craco.js.org/docs/getting-started/

with:
path: '**/node_modules'
key: yarn-v1-${{ runner.os }}-${{ hashFiles('.nvmrc') }}-${{ hashFiles('**/yarn.lock') }}
cache: yarn
Copy link
Member

Choose a reason for hiding this comment

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

💬 suggestion: ‏The default cache mechanism does not take into account .nvmrc file. That's why we created a custom cache key here.

With the proposed change the cache will not be invalidated when we bump the node version in .nvmrc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see, I'll revert this change

@MatissJanis
Copy link
Member

Just pushed a small patch for electron app I found while testing this PR. Hope you don't mind.

Ok, this broke VRT.. apologies. I reverted my change. Will patch it in a separate PR.

@MatissJanis
Copy link
Member

🤦 it was not my changes.. the VRT in master are running against your PR. And this PR doesn't have the change you merged a few minutes ago.

Updating the branch should solve the issue

@joel-jeremy
Copy link
Contributor Author

I have rebased the branch. Feel free to commit your electron fix :)

@joel-jeremy joel-jeremy merged commit 319d196 into actualbudget:master Sep 5, 2023
17 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Sep 5, 2023
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
* desktopc-client swc-loader

* More swc

* Jest swc + upgrades

* Revert @swc/jest usage for now

* SWC minify

* Remove setupFilesAfterEnv in package.json as per warning message in CI

* Release notes

* Minify on CI

* swc helpers in loot-core

* @swc/jest

* Upgrade webpack

* Add @swc/core to crdt

* Use yarn cache in github actions

* Cleanup

* Fix electron

* Revert "Fix electron"

This reverts commit 787af19.

* Revert action.yml cache changes

---------

Co-authored-by: Matiss Janis Aboltins <[email protected]>
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