Ever since webpack 2 implemented the ES6 module system, the require('./mytemplate.html')
syntax seems to be causing issues in an Angular 1 project that is based on webpack 2.
There doesn't seem to be a suitable loader available for webpack 2 that can handle loading html templates.
What is the correct method to load Angular 1 template files using webpack 2?
It's worth noting that I am utilizing TypeScript classes to create Angular 1 components, which include a property like this:
template: require('./mytemplate.html')
.
export class MyComponent implements ng.IComponentOptions {
public template: string = require('./mytempalte.html');
public controller = MyControllerClass;
}