📦(frontend) setup browserlist and support chrome >= 109#750
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe frontend adds Browserslist targets, updates Vite tooling, enables runtime polyfills through the legacy plugin, disables legacy chunks, and switches build minification to Oxc. ChangesFrontend browser targeting
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/frontend/vite.config.ts`:
- Around line 11-13: Replace the synchronous readFileSync/JSON.parse logic used
to initialize browserslist in vite.config.ts with a direct package.json import,
relying on the existing resolveJsonModule setting. Preserve the browserslist
string[] typing and remove the now-unused filesystem/path dependencies if
applicable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fc0b8b84-0702-4dbe-8537-6fcd9053e36c
⛔ Files ignored due to path filters (1)
src/frontend/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
src/frontend/package.jsonsrc/frontend/vite.config.ts
19caabf to
b2ed3a7
Compare
|
@sylvinus I know that keeping bundle size as small as possible is important for you. So before merging that, I would like to know if you are ok to increase a little bit the bundle size (~66kb / 23.5kb gziped) in favor of maintanability and support of some "old" browsers. |
|
@jbpenrath ok for me. Shouldn't we also add a target minimum firefox version? I think @lebaudantoine knows which version some ministries are pinned at, which could be a good floor? |
|
Also do we have a clean message in case of non-support for older browsers? |
Some of our users has reported issues using the application with Chrome 109. Instead of polyfilling one by one each method, we setup vite legacy plugin and configured a browserlist. It adds a 23.5Kb Gzipped module but the polyfill strategy management is more standard and robust. Close #741
b2ed3a7 to
a65797d
Compare
Purpose
Some of our users has reported issues using the application with Chrome 109. Instead of polyfilling one by one each method, we setup vite legacy plugin and configured a browserlist. It adds a 23.5Kb Gzipped module but the polyfill strategy management is more standard and robust.
Then with the upgrade to vite 8.1.5 we save ~400kb (~125kb gzipped) on the global bundle size 😉
Close #741
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Improvements
Chores