edge-runtime
edge-runtime copied to clipboard
Import maps don't take NPM modules
Bug report
Currently, NPM modules are not supported in import maps. It makes the runtime fail:
Import map:
{
"imports": {
"iseven": "npm:is-even"
}
}
Code:
import isEven from "iseven";
globalThis.isTenEven = isEven(9);
Panic
thread 'deno_runtime::test::test_eszip_with_source_file' panicked at crates/base/src/deno_runtime.rs:491:30:\ncalled `Result::unwrap()` on an `Err` value: Relative import path \"iseven\" not prefixed with / or ./ or ../ f