Improve @babel/runtime esm stability (#12883)

This commit is contained in:
Nicolò Ribaudo
2021-02-24 20:04:03 +01:00
committed by GitHub
parent c9da9650eb
commit 6a471decc3
47 changed files with 2535 additions and 159 deletions

View File

@@ -0,0 +1,13 @@
console.log("================= require - esm =====================");
try {
const toPrimitive = require("@babel/runtime/helpers/esm/toPrimitive");
console.log("typeof toPrimitive:", typeof toPrimitive);
console.log("typeof toPrimitive.default:", typeof toPrimitive.default);
const value = toPrimitive.default({ valueOf: () => 2 });
console.log("Value:", value);
} catch (error) {
console.log("Error:", error.message);
}