_This issue was originally filed by @butlermatt_ --- Currently dart2js supports -D option to define environment variables. See Seth's blog post: http://blog.sethladd.com/2013/12/compile-time-dead-code-elimination-with.html Currently pub build will not accept (let alone pass) -D arguments to dart2js.