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
You can use HTML loader and angular $templateCache service
angular
.module('template',[])
.run(['$templateCache', function($templateCache) {
var url = 'views/common/navigation.html';
$templateCache.put(url, require(url));
}]);
webpack loader config:
{
test: /\.html$/,
loader: 'html',
query: {
root:sourceRoot
}
}