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:
parent
925f47fece
commit
2ba5a0ac93
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue