Skip to content

Commit

Permalink
chore: add hmr to example app
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Jul 27, 2022
1 parent fc709ee commit 63876e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions apps/analog-app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { bootstrapApplication } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';

// import initHmr from '@angular-devkit/build-angular/src/webpack/plugins/hmr/hmr-accept';
import initHmr from '@angular-devkit/build-angular/src/webpack/plugins/hmr/hmr-accept';

import { AppComponent } from './app/app.component';
import { routes } from './app/routes';
Expand All @@ -22,8 +22,8 @@ bootstrapApplication(AppComponent, {
],
}).catch((err) => console.error(err));

// if (import.meta.hot) {
// import.meta.hot.accept((newMod) => {
// initHmr(import.meta);
// });
// }
if (!import.meta.env.PROD && import.meta.hot) {
import.meta.hot.accept((newMod) => {
initHmr(import.meta);
});
}
2 changes: 1 addition & 1 deletion apps/analog-app/stats.html

Large diffs are not rendered by default.

0 comments on commit 63876e5

Please sign in to comment.