Skip to content

Commit cd934e1

Browse files
authored
fix: use new import.meta.webpackHmr to account for esm (#51)
1 parent 4d071bd commit cd934e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/angular/src/lib/application.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export interface AppRunOptions<T, K> {
6262
launchView?: (reason: NgModuleReason) => AppLaunchView;
6363
}
6464

65-
if (module['hot']) {
66-
module['hot'].decline();
65+
if (import.meta['webpackHot']) {
66+
import.meta['webpackHot'].decline();
6767
global.__onLiveSyncCore = () => {
6868
Application.getRootView()?._onCssStateChange();
6969
// all other changes are applied by runNativeScriptAngularApp
@@ -394,7 +394,7 @@ export function runNativeScriptAngularApp<T, K>(options: AppRunOptions<T, K>) {
394394
if (oldAddEventListener) {
395395
global.NativeScriptGlobals.events.addEventListener = oldAddEventListener;
396396
}
397-
if (module['hot']) {
397+
if (import.meta['webpackHot']) {
398398
// handle HMR Application.run
399399
global['__dispose_app_ng_platform__'] = () => {
400400
disposePlatform('hotreload');

0 commit comments

Comments
 (0)