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

查看:22
本文介绍了在 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天全站免登陆