mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
As per #325, reference module.hot directly instead of via a local var, because Webpack does static analysis that looks for this
This commit is contained in:
@@ -5,10 +5,9 @@ import { AppModule } from './app/app.module';
|
||||
import 'bootstrap';
|
||||
|
||||
// Enable either Hot Module Reloading or production mode
|
||||
const hotModuleReplacement = module['hot'];
|
||||
if (hotModuleReplacement) {
|
||||
hotModuleReplacement.accept();
|
||||
hotModuleReplacement.dispose(() => { platform.destroy(); });
|
||||
if (module['hot']) {
|
||||
module['hot'].accept();
|
||||
module['hot'].dispose(() => { platform.destroy(); });
|
||||
} else {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user