mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
2 lines
396 B
JavaScript
2 lines
396 B
JavaScript
const j = await (typeof process === "object" && process.versions?.node ? Promise.all([import("fs"), import("module")]).then(([fs, module]) => new Promise((a => (r, j) => fs.readFile(a, (e, d) => e ? j(e) : r(d)))(module.createRequire(import.meta.url).resolve("./x.json")))).then(JSON.parse) : fetch(import.meta.resolve?.("./x.json") ?? new URL("./x.json", import.meta.url)).then(r => r.json()));
|