single-spa / single-spa-examples

Examples of single-spa applications.
https://single-spa.surge.sh
MIT License
359 stars 128 forks source link

single-spa-examples loads very slowly & appears to be using development version of react #66

Open omril1 opened 5 years ago

omril1 commented 5 years ago

Describe the bug or question The site https://single-spa.surge.sh/react loads very slowly, Seems to download ~7.7MB over 30 seconds on the initial request, which is very bad for the public relations of this software. Additionally, react-devtools alerts that this site is using development build of react

To Reproduce

  1. Open the URL in chrome while chrome devtools is open
  2. Go to network tab
  3. Hit Ctrl + shift + R
  4. Open react devtools and look at the message

Expected behavior A clear and concise description of what you expect or hope to happen.

Screenshots and/or console output image

image

Additional context I thought about showing this software to my team, but the page took more than 30 seconds to load on my laptop, which was very embarrassing.

frehner commented 5 years ago

Yup, it appears that the first two bundles are huge.

However, those bundles are almost guaranteed to be from the React example code. Perhaps you can look at the source code and figure out why it's so large and submit a pull request to make it smaller?

This website was mainly built as a simple example of how many, many different frameworks could live on the same page, but as you have noticed it hasn't been optimized.