本文介绍了如何在dart build中启用--enable-experimental-mirrors?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目构建失败,因为他们依赖镜像和dart build out put告诉我使用 - enable-experimental-mirrors 尝试使用镜像dart2js代码。所以如果我运行 pub build --enable-experimental-mirrors 所有我得到的是找不到一个名为enable-experimental-mirrors的选项。任何提示非常感谢。

My build of my projects are failing because they rely on mirrors and dart build out put tells me to use --enable-experimental-mirrors to try to use mirrors in dart2js code as it is. so if I run pub build --enable-experimental-mirrors all I get is Could not find an option named "enable-experimental-mirrors". Any hints much appreciated.

推荐答案

我还没有尝试过,但也许你可以传递它作为命令行选项变压器配置

I haven't tried this myself yet but maybe you can pass it as a command line option in the transformer config

transformers:
- $dart2js:
    commandLineOptions: [--enable-experimental-mirrors]

这篇关于如何在dart build中启用--enable-experimental-mirrors?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 08:07