diff options
Diffstat (limited to 'tests/testdata/npm/dynamic_import/other.ts')
-rw-r--r-- | tests/testdata/npm/dynamic_import/other.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/testdata/npm/dynamic_import/other.ts b/tests/testdata/npm/dynamic_import/other.ts new file mode 100644 index 000000000..008f8833e --- /dev/null +++ b/tests/testdata/npm/dynamic_import/other.ts @@ -0,0 +1,11 @@ +console.log("B"); +const chalk = (await import("npm:chalk@5")).default; + +console.log(chalk.green("C")); + +try { + // Trying to import a devDependency should result in an error + await import("xo"); +} catch (e) { + console.error("devDependency import failed:", e); +} |