Extremely slow build times with yarn

Im trying to do a production build and since adding Zoom SDK it takes a very long time > 25mins if im lucky.

Its a nextjs app and zoom is integrated into the component as follows:

  useEffect(() => {
    sessionStorage.setItem('fallbackUrl', state?.zoomMeetingDetails?.fallbackUrl)
    setState(items => ({...items, zoomMeeting:true}))
    if(!state.zoomMeetingDetails) return (window.location.href = state?.zoomMeetingDetails?.fallbackUrl)
    zoomMtg = require('@zoomus/websdk').ZoomMtg
    zoomMtg.setZoomJSLib('https://source.zoom.us/2.9.5/lib', '/av');
  }, [])

and the package.json is

    "@emotion/react": "^11.10.0",
    "@emotion/styled": "^11.10.0",
    "@mui/icons-material": "^5.8.4",
    "@mui/lab": "^5.0.0-alpha.102",
    "@mui/material": "^5.9.3",
    "@mui/x-date-pickers": "^5.0.0-beta.4",
    "@parse/react-ssr": "^0.0.1-alpha.18",
    "@zoomus/websdk": "^2.9.5",
    "i18next": "^21.9.1",
    "i18next-http-backend": "^2.1.1",
    "moment": "^2.29.4",
    "next": "^12.2.3",
    "parse": "^3.4.3",
    "qrcode.react": "^3.1.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "^7.34.0",
    "react-hot-toast": "^2.3.0",
    "react-i18next": "^11.18.5",
    "swiper": "^8.3.2"

any idea what is causing it ?

If you import the webSDK package at the top of the file instead of dynamically within useEffect do you see a difference in build times?

Also, are you seeing performance differences when in development mode?

Here is an example app showing how you can import the WebSDK with react:

I hope that helps!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.