From 401a5c021141d4ba5a71078b28f6daefcd1826a6 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Fri, 3 May 2019 12:03:10 -0700 Subject: feat: support .mjs extension resolution (#2283) Removed `extmap` and added .mjs entry in `map_file_extension`. The assert in the compiler does not need to be updated, since it is resolving from the compiled cache instead of elsewhere (notice the .map is asserted next to it) --- tests/021_mjs_modules.test | 2 ++ tests/021_mjs_modules.ts | 2 ++ tests/021_mjs_modules.ts.out | 1 + tests/subdir/mod5.mjs | 1 + 4 files changed, 6 insertions(+) create mode 100644 tests/021_mjs_modules.test create mode 100644 tests/021_mjs_modules.ts create mode 100644 tests/021_mjs_modules.ts.out create mode 100644 tests/subdir/mod5.mjs (limited to 'tests') diff --git a/tests/021_mjs_modules.test b/tests/021_mjs_modules.test new file mode 100644 index 000000000..9b60b9d97 --- /dev/null +++ b/tests/021_mjs_modules.test @@ -0,0 +1,2 @@ +args: --reload tests/021_mjs_modules.ts +output: tests/021_mjs_modules.ts.out diff --git a/tests/021_mjs_modules.ts b/tests/021_mjs_modules.ts new file mode 100644 index 000000000..6052b9081 --- /dev/null +++ b/tests/021_mjs_modules.ts @@ -0,0 +1,2 @@ +import { isMod5 } from "./subdir/mod5.mjs"; +console.log(isMod5); diff --git a/tests/021_mjs_modules.ts.out b/tests/021_mjs_modules.ts.out new file mode 100644 index 000000000..27ba77dda --- /dev/null +++ b/tests/021_mjs_modules.ts.out @@ -0,0 +1 @@ +true diff --git a/tests/subdir/mod5.mjs b/tests/subdir/mod5.mjs new file mode 100644 index 000000000..f21d8862b --- /dev/null +++ b/tests/subdir/mod5.mjs @@ -0,0 +1 @@ +export const isMod5 = true; -- cgit v1.2.3