I\'m new to webpack and right now I\'m using it for the first time in one of my angular projects.
I want to use the require function in my html file in order to requ
Another approach would be to transform my-template.html into a angular component:
Assuming you use html-loader to load your HTML files (loaders: {test: /\.html/, loader: 'html'}), define a component myTemplate in your module JavaScript file:
import myTemplate from './my-template.html';
angular.module(...)
.component('myTemplate', {template: myTemplate})
Afterwards use it: