`/*#__PURE__*/` annotation ineffective for tree-shaking top-level `await import().then(...)` expressions
Author: GaubeeCreated May 6, 2025Updated May 21, 2026
Labelst¹ 🐞 bugt⁸ ⋅ triage
Rollup Version
4.40.2
Operating System (or Browser)
Node Version (if applicable)
No response
Link To Reproduction
Expected Behaviour
/*#__PURE__*/await import is pure function call
const a = await import('./all-DnWgraJt.js').then(({native_a,shim_a})=>native_a?native_a:shim_a);
// await import('./all-DnWgraJt.js').then(({native_b,shim_b})=>native_b?native_b:shim_b);
console.log(a);Actual Behaviour
const a = await import('./all-DnWgraJt.js').then(({native_a,shim_a})=>native_a?native_a:shim_a);
await import('./all-DnWgraJt.js').then(({native_b,shim_b})=>native_b?native_b:shim_b); // should be removed
console.log(a);Source: rollup/rollup