stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

fix: Reduce bundle size by update import path

Open jakapatb opened this issue 6 months ago • 0 comments

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 from src/i18n/Streami18n.ts to src/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

Screenshot 2567-08-18 at 18 04 58

After

Screenshot 2567-08-18 at 18 09 51

https://github.com/jakapatb/simple-stream-chat-react-optimized/tree/main/analyze

🎨 UI Changes

No UI changes

jakapatb avatar Aug 18 '24 11:08 jakapatb