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';
|
import 'bootstrap';
|
||||||
|
|
||||||
// Enable either Hot Module Reloading or production mode
|
// Enable either Hot Module Reloading or production mode
|
||||||
const hotModuleReplacement = module['hot'];
|
if (module['hot']) {
|
||||||
if (hotModuleReplacement) {
|
module['hot'].accept();
|
||||||
hotModuleReplacement.accept();
|
module['hot'].dispose(() => { platform.destroy(); });
|
||||||
hotModuleReplacement.dispose(() => { platform.destroy(); });
|
|
||||||
} else {
|
} else {
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user