You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running npm run start, the browser opens almost immediately leaving a blank page for a good few seconds before the code is actually compiled.
Describe the solution you'd like
It would be better if the browser only gets invoked after compilation has passed.
Additional context
This can be achieved easily with WebpackDevServer hooks as with the following snippet:
letcompiledOnce=false;// After WebpackDevServer compiles the bundle, open it in the browser.compiler.hooks.afterCompile.tap(appName,()=>{if(!compiledOnce){openBrowser(urls.localUrlForBrowser);}compiledOnce=true;});
(Maybe someone can help me with that ugly boolean variable that is required to prevent new tabs when hot reloading)
The text was updated successfully, but these errors were encountered:
Is your proposal related to a problem?
When running
npm run start
, the browser opens almost immediately leaving a blank page for a good few seconds before the code is actually compiled.Describe the solution you'd like
It would be better if the browser only gets invoked after compilation has passed.
Additional context
This can be achieved easily with WebpackDevServer hooks as with the following snippet:
(Maybe someone can help me with that ugly boolean variable that is required to prevent new tabs when hot reloading)
The text was updated successfully, but these errors were encountered: