How to add pug to angular-cli?

So after reading on angular-cli git, implementing pug is not in the near future.

So here is my workaround: It's not the angular-cli, but its an updated generator that runs angular2 final.

Use angular2-webpack generator from AngularClass - here (Just follow the well documented instructions)

Want pug? no problem, just follow the link here

Want Scss? no problem, just follow the link here

To keep it short, just do the npm installing and add those line in webpack.common file. And use require() in your component with ./filename.pug :) but follow the links and you'll be fine.

Thanks AngurlarClass <3

This was was what I was looking for - angular2, typescript, scss and pug.. Yum Yum!

      loaders: [
        { 
          test: /\.pug$/, 
          loader: 'pug-html-loader' 
        },
        {
          test: /\.scss$/,
          exclude: /node_modules/,
          loaders: ['raw-loader', 'sass-loader'] // sass-loader not scss-loader
        },

For Angular 6+ you can simply run ng add ng-cli-pug-loader command in the root folder to turn on pug support in your angilar-cli project.