I've been encountering this problem for quite some time now and have searched extensively online for solutions. However, I believe I may not be using the correct terminology to accurately pinpoint the issue.
Within my package.json
, I have included the following command which is executed when running $ npm start
:
ng serve --host 0.0.0.0 --disableHostCheck --proxy-config proxy.dev.json --extract-css --show-circular-dependencies false
Upon starting my application with 'npm start', everything appears to be functioning correctly. Nevertheless, after seeing 'webpack: Compiled succesfully,' there seems to be a significant delay (7-8 seconds) before the page or loading screen is displayed (a spinner is shown during HTTP calls).
I am curious about the process that occurs between successful compilation and the actual display of the page. Following a successful compilation, I encounter a blank page for 7-8 seconds.
Once the page loads and I navigate to another page through the menu, everything displays instantly. However, if I manually change the URL and hit enter, it takes 7-8 seconds to load the page.
During these delays, there is no activity evident in the console, network tab, or elsewhere... Are there any troubleshooting steps I could take to identify this intermittent lack of response?
It is worth noting that this issue does not arise when serving the application with Apache after executing ng build --prod
.
Angular version 5.2.11 Angular-CLI 1.7.4
Network tab https://i.sstatic.net/66Se3.png
Performance tab https://i.sstatic.net/TpbsZ.png