Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
How to lazy load apps inside a library into another library in reactjs using creatre-react-app

I have an app which imports our custom libraries we created using create-react-app plugin.

However, we have imported library inside library too, so in this case we have a lib umai-settings.[hash] thats has crossed 1 MB size, and since using library we cant lazy load the pages/components in the lib.

Since build on the library needs a bundle file, and the lazy loaded chunks does not work while importing the app, and give Syntax Error unexpected token on lazy loaded lib routes.

enter image description here

In the below image you can see the app umai-settings.[hash], has two two apps venue-settings and team-management, which combining crosses 1 MB.

enter image description here

Moreover, we have already tried to compress and minify the code using webpack, and also performed tree shaking to reduce the size of the application.

So now we are considering if its possible to lazy load inside library using react lazy and suspense so that it further breaks down the chunks into smaller size. ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!