0

I am using hot.accept in the root of my application, and so far it's worked brilliantly.

var hot = (<any>module).hot;
if (hot) {
    hot.accept();
}

However, since I migrated to Angular 2 RC5, and use their module system, I have run into issues. Specifically the issue I run into is with the ReactiveFormsModule in "@angular/forms".

Having this in my application breaks HMR for my entire application. How do I account for this third party module and make sure it gets accepted?

twilliams
  • 475
  • 1
  • 6
  • 20

1 Answers1

0

As it turns out, the cause for this issue was that I had failed to add @angular/forms into my webpack entry import list.

// Angular 2
import "@angular/platform-browser";
import "@angular/platform-browser-dynamic";
import "@angular/core";
import "@angular/common";
import "@angular/forms"; // was commented out
import "@angular/http";
import "@angular/router";

Adding this in resolved the issue immediately.

twilliams
  • 475
  • 1
  • 6
  • 20