stream-chat-react
stream-chat-react copied to clipboard
fix: Reduce bundle size by update import path
Submit a pull request
🎯 Goal
- Reduce bundle size of my Next.js App
- Remove unused code from bundle
- Import from dist folder directly
🛠 Implementation details
- update import path from barrel file to specific file
- move
defaultTranslatorFunction
function fromsrc/i18n/Streami18n.ts
tosrc/i18n/utils.ts
for reduce unused import when import specific file Parsed size from 1.12mb to 1.02mb Repo: https://github.com/jakapatb/simple-stream-chat-react-optimized
Current
After
https://github.com/jakapatb/simple-stream-chat-react-optimized/tree/main/analyze
🎨 UI Changes
No UI changes