Skip to content

Commit

Permalink
A couple small simplifications related to ES6 modules.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160142836
  • Loading branch information
blickly authored and brad4d committed Jun 26, 2017
1 parent 5e037ee commit 7db7728
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/com/google/javascript/jscomp/Compiler.java
Expand Up @@ -2071,8 +2071,7 @@ private List<CompilerInput> parsePotentialModules(List<CompilerInput> inputsToPr
// Only process files that are detected as ES6 modules
if (!options.dependencyOptions.shouldPruneDependencies()
|| !JsFileParser.isSupported()
|| (input.getLoadFlags().containsKey("module")
&& input.getLoadFlags().get("module").equals("es6"))) {
|| "es6".equals(input.getLoadFlags().get("module"))) {
filteredInputs.add(input);
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/com/google/javascript/jscomp/CompilerInput.java
Expand Up @@ -393,14 +393,10 @@ private static <T> Set<T> concat(Iterable<T> first, Iterable<T> second) {
}

ModulePath getPath() {
return getPath(getName());
}

private ModulePath getPath(String name) {
if (modulePath == null) {
// Note: this method will not be called until Es6RewriteModules
// (and similar), after Compiler.moduleLoader is already set.
this.modulePath = compiler.getModuleLoader().resolve(name);
this.modulePath = compiler.getModuleLoader().resolve(getName());
}
return modulePath;
}
Expand Down

0 comments on commit 7db7728

Please sign in to comment.