mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Fix HMR again following previous change
This commit is contained in:
@@ -16,8 +16,11 @@ if (hotModuleReplacement) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
// Boot the application
|
||||
// Boot the application, either now or when the DOM content is loaded
|
||||
const platform = platformUniversalDynamic();
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
platform.bootstrapModule(AppModule);
|
||||
});
|
||||
const bootApplication = () => { platform.bootstrapModule(AppModule); };
|
||||
if (document.readyState === 'complete') {
|
||||
bootApplication();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', bootApplication);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user