It seems that the following scenario is not supported:
// entry.ts
async function test() {
const a = await import('./hello')
const b = await import('./hello')
console.log(a === b)
}
test()
// hello.ts
rolldown:
// entry.js
async function test() {
const a = await import("./hello-hoTXCQ30.js");
const b = await import("./hello-hoTXCQ30.js");
console.log(a === b);
}
test();
// hello-hoTXCQ30.js
rollup:
async function test() {
const a = await Promise.resolve().then(function () { return hello; });
const b = await Promise.resolve().then(function () { return hello; });
console.log(a === b);
}
test();
var hello = /*#__PURE__*/Object.freeze({
__proto__: null
});
Originally posted by @shulaoda in #3911 (review)
rolldown:
rollup:
Originally posted by @shulaoda in #3911 (review)