Index: pkg/polymer/lib/src/build/mirrors_remover.dart |
diff --git a/pkg/polymer/lib/src/build/mirrors_remover.dart b/pkg/polymer/lib/src/build/mirrors_remover.dart |
index 19f6fd6aeaef5d4d7b6668fe3516d8b4dcfd2c54..2eb3294961d0c2833d6c2c78eb597fd75ecd4203 100644 |
--- a/pkg/polymer/lib/src/build/mirrors_remover.dart |
+++ b/pkg/polymer/lib/src/build/mirrors_remover.dart |
@@ -32,9 +32,13 @@ class MirrorsRemover extends Transformer { |
var end = code.indexOf('show MirrorsUsed;', start); |
if (end == -1) _error(); |
end = code.indexOf('\n', end); |
+ var loaderImport = code.indexOf( |
+ "import 'src/mirror_loader.dart' as loader;", end); |
+ if (loaderImport == -1) _error(); |
var sb = new StringBuffer() |
..write(code.substring(0, start)) |
- ..write(code.substring(end)); |
+ ..write(code.substring(end) |
+ .replaceAll('src/mirror_loader.dart', 'src/static_loader.dart')); |
transform.addOutput(new Asset.fromString(id, sb.toString())); |
}); |