perf: remove typeorm decorators in frontend to reduce bundle size #1328

Closed
opened 2026-04-05 16:26:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @soknaly on 12/7/2023

Remove the typeorm decorators in frontend to reduce bundle size

While analyzing the big bundle size, I noticed that typeorm decorators (which are for backend only) are included in the bundle of the frontend too (Dashboard, StatusPage). It's a waste of bundle size to include it as the frontend doesn't need that.

Managed to save another ~18% of the total bundle size (after gzipped).

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

Screenshots (if appropriate):

Before: Dashboard

before-remove-typeorm

After: Dashboard

after-remove-typeorm

Before: StatusPage

status-page-before-remove-typeorm

After: StatusPage

status-page-after-remove-typeorm

*Originally created by @soknaly on 12/7/2023* ### Remove the typeorm decorators in frontend to reduce bundle size While analyzing the big bundle size, I noticed that typeorm decorators (which are for backend only) are included in the bundle of the frontend too (Dashboard, StatusPage). It's a waste of bundle size to include it as the frontend doesn't need that. Managed to save another ~18% of the total bundle size (after gzipped). ### Pull Request Checklist: - [ ] Please make sure all jobs pass before requesting a review. - [ ] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). - [x] Have you lint your code locally before submission? - [ ] Did you write tests where appropriate? ### Related Issue? ### Screenshots (if appropriate): ### Before: Dashboard ![before-remove-typeorm](https://github.com/OneUptime/oneuptime/assets/20983608/0ac42784-a7bf-47e0-82b2-2b589cd2031b) ### After: Dashboard ![after-remove-typeorm](https://github.com/OneUptime/oneuptime/assets/20983608/1732b026-35d1-4656-8bc0-ad866cbaebd4) ### Before: StatusPage ![status-page-before-remove-typeorm](https://github.com/OneUptime/oneuptime/assets/20983608/d87ef477-434e-4a28-b15e-32edbd39040b) ### After: StatusPage ![status-page-after-remove-typeorm](https://github.com/OneUptime/oneuptime/assets/20983608/13b91e2c-f6d3-46a4-ae80-42aa41dac5ee)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1328