mirror of
https://github.com/denoland/deno.git
synced 2024-12-20 22:34:46 -05:00
f9007d3386
implement require(esm) using `op_import_sync` from deno_core. possible future changes: - cts and mts - replace Deno.core.evalContext to optimize esm syntax detection Fixes: https://github.com/denoland/deno/issues/25487
5 lines
129 B
TypeScript
5 lines
129 B
TypeScript
import { createRequire } from "node:module";
|
|
|
|
const require = createRequire(import.meta.url);
|
|
|
|
console.log(require("./esm.js"));
|