Dart 如何在angular2省道组件中包含.less文件
我想在我的dart angular 2应用程序中使用更少的预处理器。我到底是做什么的:Dart 如何在angular2省道组件中包含.less文件,dart,angular,less,Dart,Angular,Less,我想在我的dart angular 2应用程序中使用更少的预处理器。我到底是做什么的: 在pabspec.yaml文件中包含依赖项 -更少的省道: 入口点:web/main.less 构建模式:dart 将包含到index.html文件中 在web文件夹中,我还添加了main.less文件 在这一点上,我的应用程序工作正常,但当我尝试在中的其他组件中包含其他.less文件时,会导致ExOption,例如: 我创建了app.less文件,在里面我写了更少的代码 在app_component.dar
-更少的省道:
入口点:web/main.less
构建模式:dart
包含到index.html文件中styleurl:const['app.less'],
因此,我有这样的假设:你在
pubspec.yaml
中添加了transformers:-less_dart
部分了吗?@GünterZöchbauer,是的,当然。我添加了依赖项:less_-dart:“^0.3.3”和变形金刚:-less_-dart:entry_-point:web/main.less build_-mode:dart以及自述文件中的entry_-points'
不是entry_-point
@GünterZöchbauer我写的entry_-points,它给出了相同的值effect@GünterZöchbauer我也有类似的问题,但这对我没有帮助,有额外的样品吗?