cal.com
cal.com copied to clipboard
Replace React in client production build with Preact
What does this PR do?
take 2 of #1292
Type of change
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
How should this be tested?
- [ ]
yarn build
andyarn start
- [ ]
yarn test-e2e
Checklist
- I haven't performed a self-review of my own code and corrected any misspellings
- I haven't checked if my changes generate no new warnings
- I haven't added tests that prove my fix is effective or that my feature works
- I haven't checked if new and existing unit tests pass locally with my changes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
cal | ❌ Failed (Inspect) | Sep 8, 2022 at 4:12PM (UTC) | |
cal-com | ❌ Failed (Inspect) | Sep 8, 2022 at 4:12PM (UTC) | |
nightly-cal | ❌ Failed (Inspect) | Sep 8, 2022 at 4:12PM (UTC) |
1 Ignored Deployment
Name | Status | Preview | Updated |
---|---|---|---|
swagger | ⬜️ Ignored (Inspect) | Sep 8, 2022 at 4:12PM (UTC) |
Socket Security Report
Dependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again.
📜 New install scripts detected
A dependency change in this PR is introducing new install scripts to your install step.
Package | Script field | Location |
---|---|---|
[email protected] (added) | postinstall |
apps/web/package.json via [email protected] |
Socket.dev scan summary
Issue | Status |
---|---|
Did you mean? | ✅ no new possible package typos |
Install scripts | ⚠️ 1 new install script detected |
Telemetry | ✅ no new telemetry |
Troll package | ✅ no new troll packages |
Malware | ✅ no new malware |
Native code | ✅ no new native modules |
Powered by socket.dev
@zomars are there any more benefits of preact other than reduced bundle size ?
@zomars are there any more benefits of preact other than reduced bundle size ?
Other than reducing client side bundle size I'm not pretty sure. But every KB we can save without sacrificing functionality and performance is a win if you ask me.
@zomars do you still want to implement this change? Preact is a pretty strong alternative (https://preactjs.com/guide/v8/differences-to-react/) but my main concern is versioning. As Cal keeps the Next.js version up to date, they may bump the React version under the hood and I'm thinking this will be a cause of concern around keeping the Preact version inline. Do you think the space saving is worth it? IMO it is not.
I wouldn't worry too much about versioning as this change is easily reversible. Even Next.js maintainers use this technique all the time.
@zomars PR has been updated in case anyone wanna try it out. It worked for me
how much do we save? anyone has benchmarks?
Closing since the gain/effort to debug tests is not worth right now.