3

I've run the performance check in Chrome's developer tools, under the Lighthouse tab. It recommends me to "Remove unused Javascript" and suggests: …/node_modules/react-dom/cjs/react-dom.development.js would provide a potential saving of 60.7 KiB.

I've tried removing the module entirely, but it breaks my app. There is a dependency on material-UI core files that I have installed.

I've no idea what to do next. Should I leave this and accept that it's a "necessary" bit of wasted code, or is there something else?

Tom Aranda
  • 5,919
  • 11
  • 35
  • 51
JimmyTheCode
  • 3,783
  • 7
  • 29
  • 71
  • 1
    Hi, `.development` means you're using _React DOM_'s development package so you may want to test your app with a production build instead – t3__rry Dec 22 '20 at 15:03
  • 2
    Hey, if you have used `create-react-app` to set your project up, you can just use `npm run build` to create a production build, as @t3__rry mentioned. – foxxycodes Dec 22 '20 at 15:37
  • 1
    Great spot @t3__rry and foxxycodes - I was getting too bogged down in stuff that was already fixed by the create-react-app build script. Hopefully anyone who reads this far will save themselves a lot of time :-) – JimmyTheCode Jan 04 '21 at 15:23

0 Answers0