在pub构建期间关闭dart2js [英] Turn off dart2js during pub build
问题描述
我为 pub build
编写了一个自定义变换器。我想在转换器的调试期间关闭dart文件到js的编译,以节省时间。可能吗?
目前,我的简化 pubspec.yaml
是
name:my_proj
dependencies:
polymer:any
transformers:
- my_proj
pub build
只有 pub serve --no-dart2js
。
您可以临时修改档案
$ dart安装目录中的b$ b
dart / sdk / lib / _internal / pub / lib / src / barback / build_environment.dart
code> useDart2JS 更改为'false'。
或者在 pubspec.yaml中排除dart2js转换器的web目录
变压器:
- $ dart2js:
$ exclude:web
I am writing a custom transformer for pub build
. I would like to turn off compilation of dart files to js during debugging of the transformer to save time. Is it possible?
Currently, my simplified pubspec.yaml
is
name: my_proj
dependencies:
polymer: any
transformers:
- my_proj
There is no option for pub build
only for pub serve --no-dart2js
.
You could temporary modify the file
dart/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart
in your dart install directory and set useDart2JS
to 'false'.
I haven't tried it myself but I think this should work.
Or exclude the web directory for the dart2js transformer in pubspec.yaml
transformers:
- $dart2js:
$exclude: web
这篇关于在pub构建期间关闭dart2js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!