You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The framework.js file should have it's own build chunk in the output, and module_1-ae086170.js imports from that chunk instead, because of the top-level await in main-3d8a8f11.js
Actual Behaviour
module_1-ae086170.js imports a function from framework.js through main-3d8a8f11.js (inlined). This has problems because main-3d8a8f11.js contains top-level awaits that in turn waits for module_1-ae086170.js (loop).
Running the output in nodejs silently fails (node 22 starts logging a warning). Here's a stackblitz of the REPL's output copied. Run node test.js in the terminal to see nothing printed in the console.
Rollup Version
3.2.5 (also happens in v2)
Operating System (or Browser)
macos
Node Version (if applicable)
No response
Link To Reproduction
https://rollupjs.org/repl/?version=3.2.5&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMCU3QiUyMHJlbmRlciUyMCU3RCUyMGZyb20lMjAnLiUyRmZyYW1ld29yay5qcyclNUNuJTVDbmNvbnN0JTIwbW9kJTIwJTNEJTIwYXdhaXQlMjBpbXBvcnQoJy4lMkZtb2R1bGVfMS5qcycpJTVDbmNvbnN0JTIwc29tZXRoaW5nJTIwJTNEJTIwYXdhaXQlMjByZW5kZXIoJ3RoaW5nJyklNUNuJTVDbmV4cG9ydCUyMCU3Qm1vZCUyQyUyMHNvbWV0aGluZyU3RCUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTJDJTdCJTIybmFtZSUyMiUzQSUyMm1vZHVsZV8xLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMCU3QiUyMHJlbmRlciUyMCU3RCUyMGZyb20lMjAnLiUyRmZyYW1ld29yay5qcyclNUNuJTVDbmV4cG9ydCUyMGNvbnN0JTIwaHRtbCUyMCUzRCUyMHJlbmRlcignJTNDaDElM0V0ZXN0JTNDJTJGaDElM0UnKSUyMiUyQyUyMmlzRW50cnklMjIlM0FmYWxzZSU3RCUyQyU3QiUyMm5hbWUlMjIlM0ElMjJmcmFtZXdvcmsuanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwZnVuY3Rpb24lMjByZW5kZXIoc3RyKSUyMCU3QiUyMHJldHVybiUyMHN0ciUyMCU3RCUyMiU3RCU1RCUyQyUyMm9wdGlvbnMlMjIlM0ElN0IlMjJmb3JtYXQlMjIlM0ElMjJlcyUyMiUyQyUyMm5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmFtZCUyMiUzQSU3QiUyMmlkJTIyJTNBJTIyJTIyJTdEJTJDJTIyZ2xvYmFscyUyMiUzQSU3QiU3RCU3RCUyQyUyMmV4YW1wbGUlMjIlM0FudWxsJTdE
Expected Behaviour
The
framework.jsfile should have it's own build chunk in the output, andmodule_1-ae086170.jsimports from that chunk instead, because of the top-level await inmain-3d8a8f11.jsActual Behaviour
module_1-ae086170.jsimports a function fromframework.jsthroughmain-3d8a8f11.js(inlined). This has problems becausemain-3d8a8f11.jscontains top-level awaits that in turn waits formodule_1-ae086170.js(loop).Running the output in nodejs silently fails (node 22 starts logging a warning). Here's a stackblitz of the REPL's output copied. Run
node test.jsin the terminal to see nothing printed in the console.