We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed755e1 commit 5a64ef9Copy full SHA for 5a64ef9
sknpm/src/main.sk
@@ -908,6 +908,7 @@ fun copyAndConvertImport(
908
optCategory: ?String = None();
909
lines = contents.split("\n").map(line -> {
910
if (line.startsWith("import ") || line.startsWith("export {")) {
911
+ !line = line.replace(".js", ".mjs");
912
elements = line.split(" from ");
913
if (elements.size() == 2) {
914
imported = elements[1].split("\"");
@@ -916,11 +917,7 @@ fun copyAndConvertImport(
916
917
size = elems.size();
918
if (size > 1 && elems[0].startsWith("#")) {
919
!elems = elems.mapWithIndex((idx, v) ->
- if (idx == 0) "." else if (idx == size - 1) {
920
- `${v}.mjs`
921
- } else {
922
- v
923
- }
+ if (idx == 0) "." else v
924
);
925
!line = `${elements[0]} from "${elems.join("/")}"`
926
}
0 commit comments