Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 2ba5a0a

Browse files
As per #325, reference module.hot directly instead of via a local var, because Webpack does static analysis that looks for this
1 parent 925f47f commit 2ba5a0a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

templates/Angular2Spa/ClientApp/boot-client.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import { AppModule } from './app/app.module';
55
import 'bootstrap';
66

77
// Enable either Hot Module Reloading or production mode
8-
const hotModuleReplacement = module['hot'];
9-
if (hotModuleReplacement) {
10-
hotModuleReplacement.accept();
11-
hotModuleReplacement.dispose(() => { platform.destroy(); });
8+
if (module['hot']) {
9+
module['hot'].accept();
10+
module['hot'].dispose(() => { platform.destroy(); });
1211
} else {
1312
enableProdMode();
1413
}

0 commit comments

Comments
 (0)