For my release process I need several different "modes." However, if I use the --mode
option for pub build
and set it to any value other than release
, it forces un-minified javascript.
I know I can configure the dart2js transformer in my pubspec.yaml
, but if I set minify: true
under the $dart2js
heading in my pubspec.yaml
I am then forcing them to be minified, and then cannot produce un-minified debug builds.
What I'm really looking for is a way to configure arbitrary dart2js options (minified, checked, etc.) in pub build
via the CLI (so that I don't have to hardcode in pubspec.yaml
), or, failing that, to be able to specify additional arbitrary flags from the pub build
CLI so that I can reserve --mode
for debug
and release
. The asPlugin()
transformer constructor takes a BarbackSettings
object, but I can't see how to see arbitrary params in that via the command line.