File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -908,6 +908,7 @@ fun copyAndConvertImport(
908
908
optCategory: ?String = None();
909
909
lines = contents.split("\n").map(line -> {
910
910
if (line.startsWith("import ") || line.startsWith("export {")) {
911
+ !line = line.replace(".js", ".mjs");
911
912
elements = line.split(" from ");
912
913
if (elements.size() == 2) {
913
914
imported = elements[1].split("\"");
@@ -916,11 +917,7 @@ fun copyAndConvertImport(
916
917
size = elems.size();
917
918
if (size > 1 && elems[0].startsWith("#")) {
918
919
!elems = elems.mapWithIndex((idx, v) ->
919
- if (idx == 0) "." else if (idx == size - 1) {
920
- `${v}.mjs`
921
- } else {
922
- v
923
- }
920
+ if (idx == 0) "." else v
924
921
);
925
922
!line = `${elements[0]} from "${elems.join("/")}"`
926
923
}
You can’t perform that action at this time.
0 commit comments