Skip to content

Commit 92c4a31

Browse files
committed
insert import before export
1 parent c886dea commit 92c4a31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/dependencies/HarmonyExportDependencyParserPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = AbstractPlugin.create({
4242
} else {
4343
var immutable = statement.declaration && isImmutableStatement(statement.declaration);
4444
var hoisted = statement.declaration && isHoistedStatement(statement.declaration);
45-
dep = new HarmonyExportSpecifierDependency(this.state.module, id, name, hoisted ? 0 : (statement.range[1] + 0.5), immutable);
45+
dep = new HarmonyExportSpecifierDependency(this.state.module, id, name, hoisted ? -0.5 : (statement.range[1] + 0.5), immutable);
4646
}
4747
dep.loc = statement.loc;
4848
this.state.current.addDependency(dep);

lib/dependencies/HarmonyImportDependency.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ HarmonyImportDependency.Template = function HarmonyImportDependencyTemplate() {}
5252
HarmonyImportDependency.Template.prototype.apply = function(dep, source, outputOptions, requestShortener) {
5353
var content = HarmonyImportDependency.makeStatement(true, dep, outputOptions, requestShortener);
5454
source.replace(dep.range[0], dep.range[1] - 1, "");
55-
source.insert(0, content);
55+
source.insert(-1, content);
5656
};

0 commit comments

Comments
 (0)