Use webpack with jade-loader without explicitly requiring assets Use webpack with jade-loader without explicitly requiring assets angularjs angularjs

Use webpack with jade-loader without explicitly requiring assets


Had the same Problem.

https://www.npmjs.com/package/pug-html-loader worked for me:

module.exports = {// your config settings ...      module: [     //your modules...          loaders: [{             include: /\.jade/,             loader: 'pug-html-loader'         }]    ] };


I don't know what do you want. My need is to load a template from a directive (component in 1.5)

angular.module('app').component('myComponent', {  bindings: {},  template: require('./mytemplate.jade')()});

You can to note that I'm invoking the returned function.