perf: Optimize bundle packaging with Vite - #2553
Conversation
|
🚀 Thanks for opening this pull request! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #2553 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 64
Lines 6238 6238
Branches 1465 1466 +1
=========================================
Hits 6238 6238 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Manuel <5673677+mtrezza@users.noreply.github.com> Signed-off-by: Diamond Lewis <findlewis@gmail.com>
|
@dplewis Does this have an benefit for the developer, or is that merely an internal change? |
|
The question was to write a meaningful change log entry for developers. If you are curious to follow the trail of the issue, then you'll see that it has been opened as a solution to another issue. That other issue is just a refactor, but since this was now a larger change I'm asking whether there is anything relevant for developers to know about it that should go into the change log. |
|
@dplewis thanks for picking this up! What needs to be done before merging? Full e2e test? |
|
Dom't we already have a e2e test with puppeteer? |
@mtrezza In the future it should allow for tree shaking, I'm not sure if allows for it now as we will have to write tests for it. I can try to write one for it after this is merged.
@dblythy You wrote it lol Parse-SDK-JS/integration/test/ParseDistTest.js Lines 6 to 7 in 86eadbd |
|
This is ready for review. |
|
FYI if #2501 is merged the build size will be reduced ~16%. Before After |
Let's merge this as |
Browserify with Vite for bundling|
@mtrezza Good idea! I change the title |
|
I see you've made a commit after your last comment, is this now good to merge? |
|
It is good to merge |
# [6.2.0-alpha.3](6.2.0-alpha.2...6.2.0-alpha.3) (2025-04-15) ### Performance Improvements * Optimize bundle packaging with Vite ([#2553](#2553)) ([a4b19e5](a4b19e5))
|
🎉 This change has been released in version 6.2.0-alpha.3 |
# [7.0.0](6.1.1...7.0.0) (2025-10-14) ### Bug Fixes * Prototype Pollution vulnerability in `SingleInstanceStateController`; fixes security vulnerability [GHSA-9g8m-v378-pcg3](GHSA-9g8m-v378-pcg3) ([#2745](#2745)) ([9e7c1ba](9e7c1ba)) * HTTP status code 3XX redirection for Parse Server URL not handled properly ([#2608](#2608)) ([58e7f58](58e7f58)) * Incorrect type in `ParseObject.fetch` parameter `options` ([#2726](#2726)) ([dc78419](dc78419)) * Missing error message when returning an internal server error ([#2543](#2543)) ([f91f3f1](f91f3f1)) * Prototype pollution in `Parse.Object` and internal APIs; fixes security vulnerability [GHSA-9f2h-7v79-mxw](GHSA-9f2h-7v79-mxw3) ([#2749](#2749)) ([0097398](0097398)) * Unhandled exception when calling `Parse.Cloud.run` with option value `null` ([#2622](#2622)) ([#2623](#2623)) ([2818ed9](2818ed9)) ### Features * Add `Parse.File` upload and download progress in browser and Node environments ([#2503](#2503)) ([d3ca465](d3ca465)) * Add `Uint8Array` support for `Parse.File` data ([#2548](#2548)) ([6f6bb66](6f6bb66)) * Add option `Parse.nodeLogging` to fully log `Parse.Object` in Node.js environments ([#1594](#1594)) ([de9d057](de9d057)) * Remove `Parse.serverAuthType`, `Parse.serverAuthToken` infavor of CoreManager `REQUEST_HEADERS` config ([#2639](#2639)) ([ddc66a1](ddc66a1)) ### Performance Improvements * Optimize bundle packaging with Vite ([#2553](#2553)) ([a4b19e5](a4b19e5)) ### BREAKING CHANGES * The methods `Parse.serverAuthType()` and `Parse.serverAuthToken()` have been removed; use the CoreManager `REQUEST_HEADER` config to set authorization headers instead. ([ddc66a1](ddc66a1))
|
🎉 This change has been released in version 7.0.0 |
Pull Request
Issue
Vite is more modern than browserify and has better node polyfilling than standalone rollup.
Closes: #2410
Closes: #2425
Approach
Limitations
Bundle size and build speed has increased. There are PR's opened to remove dependencies which should significantly reduce the size.
Before:
After:
Shoutout to @dblythy for getting started on this!