Index: sdk/lib/_internal/pub/lib/src/barback/build_environment.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart b/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart |
index 9e1467b071a00811e382b5d860bd081a349ee377..af2eae8c906043bad774c0258d8914ed871e643a 100644 |
--- a/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart |
+++ b/sdk/lib/_internal/pub/lib/src/barback/build_environment.dart |
@@ -221,15 +221,18 @@ class BuildEnvironment { |
var parts = path.split(event.path); |
if (parts.contains("packages") || parts.contains("assets")) return; |
- // Skip ".js" files that were (most likely) compiled from nearby |
- // ".dart" files. These are created by the Editor's "Run as |
- // JavaScript" command and are written directly into the package's |
- // directory. When pub's dart2js transformer then tries to create the |
- // same file name, we get a build error. To avoid that, just don't |
- // consider that file to be a source. |
- // TODO(rnystrom): Remove this when the Editor no longer generates |
- // .js files. See #15859. |
+ // Skip files that were (most likely) compiled from nearby ".dart" |
+ // files. These are created by the Editor's "Run as JavaScript" |
+ // command and are written directly into the package's directory. |
+ // When pub's dart2js transformer then tries to create the same file |
+ // name, we get a build error. To avoid that, just don't consider |
+ // that file to be a source. |
+ // TODO(rnystrom): Remove these when the Editor no longer generates |
+ // .js files and users have had enough time that they no longer have |
+ // these files laying around. See #15859. |
if (event.path.endsWith(".dart.js")) return; |
+ if (event.path.endsWith(".dart.js.map")) return; |
+ if (event.path.endsWith(".dart.precompiled.js")) return; |
var id = new AssetId(package.name, |
path.relative(event.path, from: package.dir)); |
@@ -264,15 +267,18 @@ class BuildEnvironment { |
// Skip directories. |
if (!fileExists(entry)) continue; |
- // Skip ".js" files that were (most likely) compiled from nearby ".dart" |
- // files. These are created by the Editor's "Run as JavaScript" command |
- // and are written directly into the package's directory. When pub's |
- // dart2js transformer then tries to create the same file name, we get |
- // a build error. To avoid that, just don't consider that file to be a |
- // source. |
- // TODO(rnystrom): Remove this when the Editor no longer generates .js |
- // files. See #15859. |
+ // Skip files that were (most likely) compiled from nearby ".dart" |
+ // files. These are created by the Editor's "Run as JavaScript" |
+ // command and are written directly into the package's directory. |
+ // When pub's dart2js transformer then tries to create the same file |
+ // name, we get a build error. To avoid that, just don't consider |
+ // that file to be a source. |
+ // TODO(rnystrom): Remove these when the Editor no longer generates |
+ // .js files and users have had enough time that they no longer have |
+ // these files laying around. See #15859. |
if (entry.endsWith(".dart.js")) continue; |
+ if (entry.endsWith(".dart.js.map")) continue; |
+ if (entry.endsWith(".dart.precompiled.js")) continue; |
var id = new AssetId(package.name, |
path.relative(entry, from: package.dir)); |