当我运行pub build
时,我正在尝试不获取此类消息:
WARN: [Dart2JS on mylib|web/mylib.dart]:
| 1 warning(s) and 2 hint(s) suppressed in package:otherlib.
WARN: [Dart2JS on pinged|web/mylib.dart]:
| 2 warning(s) suppressed in package:mylib.
WARN: [Warning from Dart2JS on mylib|web/mylib.dart]:
| 1 hint(s) suppressed in package:mypackage.
WARN: [Warning from Dart2JS on pinged|web/mylib.dart]:
| 1 hint(s) suppressed in package:otherpackage.
我尝试使用pub build --verbose --trace
进行构建,并将--verbose
添加到pubspec.yaml中的$ dart2js转换器commandLineOptions。
默认情况下,似乎dart2js 不禁止提示和警告(因此--suppress-warnings
和--suppress-hints
选项),但pub build
“包装器“围绕dart2js更改了这些默认设置,并且没有真正的方法来启用详细程度。
答案 0 :(得分:4)
transformers:
- polymer:
entry_points: web/index.html
- $dart2js:
commandLineOptions: [--show-package-warnings]
另见: