I have a base class:
import {DomSanitizer} from '@angular/platform-browser';
export class Base {
constructor(protected sanitizer: DomSanitizer){
}
//.....lots more stuff
}
This class is extended by the following derived class:
import {DomSanitizer} from '@angular/platform-browser';
export class ChildClass extends Base{
constructor(protected sanitizer: DomSanitizer) {
super(sanitizer);
}
}
My module is importing BrowserModule.
I'm using Webpack to compile and am getting the following error at runtime:
Uncaught ReferenceError: platform_browser_1 is not defined -- app.bundle.js:58139
app.bundle.js is output by webpack, and I can see in the compiled source that indeed platform_browser_1 is not available within that chunk.
I'm not splitting my app up in any purposeful manner. Is there something I don't know about how inheritance could cause Webpack to erroneously not import a required class or something?
This is definitely a Webpack issue, because if I remove the inheritance-based usave of the DomSanitizer and just put it into the child component directly, it works fine.
To clarify, platform-browser is the module from which the DomSanitizer is imported.
Does anyone have any idea what's going on? Any help is appreciated.