Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix white screen issue when loading website and improve build performance of frontend #523

Merged
merged 4 commits into from
Jul 5, 2024

Conversation

raix
Copy link
Contributor

@raix raix commented Jun 29, 2024

Addressed an issue causing intermittent white screens during the loading process due to an empty index.html file. The frontend build process creates an empty file and then writes to it afterward, leading to an empty file for a short period, which may result in a white screen.

Additionally, fixed an issue with the Application Insights bundle generation, which is also generated in two steps. If the web app is loaded with the first (smaller) file, it also results in a white screen.

The solution involves:

  • Looping until the index.html is found.
  • Extracting the Application Insights script path using a regex.
  • Loading the script from the Web Server and checking if it’s the larger file.

Additional updates:

  • Using rimraf as cross-platform rm -rf.
  • Mark images on the landing page for lazy loading to improve page load.
  • Improved web app development build performance.

Checklist

  • I have added a Label to the pull-request
  • I have added tests, and done manual regression tests
  • I have updated the documentation, if necessary

@raix raix added the Enhancement New feature or request label Jun 29, 2024
@raix raix self-assigned this Jun 29, 2024
@raix raix linked an issue Jun 29, 2024 that may be closed by this pull request
@raix raix force-pushed the 522-make-the-single-page-app-load-fast-again branch 2 times, most recently from 6287d3c to 883e1e3 Compare June 29, 2024 10:02
@tjementum tjementum force-pushed the 522-make-the-single-page-app-load-fast-again branch 5 times, most recently from 4ea72b0 to 6065a53 Compare July 4, 2024 07:11
@tjementum tjementum changed the title Change the await of single page app generation Fix white screen issue when loading website and improve build performance of frontend Jul 4, 2024
@tjementum tjementum force-pushed the 522-make-the-single-page-app-load-fast-again branch 2 times, most recently from 7d64079 to a0a5cda Compare July 4, 2024 07:58
@tjementum tjementum force-pushed the 522-make-the-single-page-app-load-fast-again branch from a0a5cda to 66019e4 Compare July 4, 2024 08:05
Copy link

sonarqubecloud bot commented Jul 4, 2024

@tjementum tjementum merged commit 7cd2305 into main Jul 5, 2024
13 checks passed
@tjementum tjementum deleted the 522-make-the-single-page-app-load-fast-again branch July 5, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the single page app load fast again
2 participants