在Angular2中集成Sass - webpack [英] Integrate Sass in Angular2 - webpack

查看:164
本文介绍了在Angular2中集成Sass - webpack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用

解决方案

在这个时刻(8月25日),这是不可能的,但是在下一次发布angular-cli时也是可能的。

在angular-cli.json文件中,将会有一个属性名称 styles ,它将是样式文件路径的一个数组,这些文件被引用时将包含在您的应用程序中。



您可以在网络研讨会中看到我演示此功能(从12分钟左右开始)

I created a new angular2 project using the angular CLI(@1.0-webpack.2).

I would like to integrate Sass with my project.

I know that:


What I'd preffer is to have a specific directory for .scss files which should be 'watched' and compiled once they change, like .ts files after ng serve(terminal).

Thank you

解决方案

At this moment (Aug 25th) this is not possible, but it will be possible with the next release of the angular-cli.

In the angular-cli.json file there will be a property names styles which will be an array of paths to style files which when referenced will be included in your application.

You can see me demo this feature in this webinar (starting around the 12 minute mark)

这篇关于在Angular2中集成Sass - webpack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆