Angular-cli: Pug and SCSS support.

Created on 22 Nov 2016  路  7Comments  路  Source: angular/angular-cli

I saw that there were a lot of discussions about the Pug and Scss official support. As I know the proper poor request was merged to a repo. Still we do not know how to configure angular-cli to generate .pug and .scss file. Can someone help me with it?

Most helpful comment

Please, we want Pug support

All 7 comments

For Scss support, look here: https://github.com/angular/angular-cli#css-preprocessor-integration

Thanks I found your link very helpful. What about Pug support?

As far as I know Jade/Pug support is not currently being worked on by the Angular team, however another contributor has started to work this feature.

See PR #2205 and issue #1886

As @Ionaru says, we do have scss support and jade support is being tracked in https://github.com/angular/angular-cli/issues/1886.

Please, we want Pug support

@paramsingh88 @FieryCod I made a pull request to allow tweaking webpack config with a file in the project root. For now, you can use the cli at https://github.com/cashfarm/angular-advanced-cli (branch 1.2.x)

Install pug, pug-ng-html-loader and add a webpack.config.js with this to root of your project:

module.exports = {
  module: {
    rules: [
      {
        test: /\.(pug|jade)$/,
        use: ['pug-ng-html-loader']
      }
    ]
  }
}

Then your components can use pug

@Component({
  selector: 'app-root',
  templateUrl: './app.component.pug',
  styleUrls: ['./app.component.styl']
})

But your index has to stay in html.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sysmat picture sysmat  路  3Comments

JanStureNielsen picture JanStureNielsen  路  3Comments

NCC1701M picture NCC1701M  路  3Comments

hartjo picture hartjo  路  3Comments

rwillmer picture rwillmer  路  3Comments