Index: sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
index 8c7ff14c0ebc63467759ac3ca87c8bc4f7dbe34a..9097e0747d2d38c37826e1478e9091d0f47fe76a 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart |
@@ -166,13 +166,15 @@ class Dart2JSTransformer extends Transformer implements LazyTransformer { |
/// Parses and returns the "environment" configuration option. |
Map<String, String> get _configEnvironment { |
- if (!_settings.configuration.containsKey('environment')) return null; |
+ if (!_settings.configuration.containsKey('environment')) { |
+ return _environment.environmentConstants; |
+ } |
var environment = _settings.configuration['environment']; |
if (environment is Map && |
environment.keys.every((key) => key is String) && |
environment.values.every((key) => key is String)) { |
- return environment; |
+ return mergeMaps(environment, _environment.environmentConstants); |
} |
throw new FormatException('Invalid value for \$dart2js.environment: ' |