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
To make rolldown itself and some features work, rolldown has to add some "extra" rolldown content. These "extra" content currently are treated as if they're users' input though they're not.
To add some js helpers in the output, rolldown has a \0rolldown/runtime.js module to store these content.
To make FBM lazy compiltation works, rolldown has to intercept the lazy entry modules and redirect their content to a new proxy module [original module id]?rolldown-lazy.
These modules are treated as "modules", so users can actually observe them somehow and this causes some issues. To solve these issues, we have to add some privileges to these modules. rolldown/rolldown#10580 is a very good exmaple.
Bad smell behaviors:
Users' code doesn't actually import \0rolldown/runtime.js but Rolldown now has to pretend they did and make every bundler state correct
[original module id]?rolldown-lazy modules are hard-coded to be hidden from users' plugin observation
Try to reasoning from the idea, I assume we will have an isInternal props in Module and by default we skip these internal modules from all module level hooks.
And if users want to observe them, we could expose something like
Try to reasoning from the idea, I assume we will have an isInternal props in Module and by default we skip these internal modules from all module level hooks.
I feel they're some difficulties here. rolldown-plugin-lazy-compilation currently is a "normal user plugin", how can we make it to somehow do that "this module I returned is an internal module"? This means we need to provide some "privileges" API to rust plugin API .
For those who use rust rolldown, isn't this somehow still a "privilege" that can be observed by outside? I know that rust rolldown users aren't a general usage, but I think is a good angle to judge if we're exposing correct interfaces.
Activity
h-a-n-a commentedon Aug 3, 2026
@sapphi-red: rolldown/rolldown#10580 (comment)
isInternalsounds good to me.hyfdev commentedon Aug 3, 2026
Try to reasoning from the idea, I assume we will have an
isInternalprops inModuleand by default we skip these internal modules from all module level hooks.And if users want to observe them, we could expose something like
I feel we should first figure out what's the fundamental nature of these content.
h-a-n-a commentedon Aug 3, 2026
I'm not sure about the
skipInternalModulespart. I doubt we want users to observe internal things like that.hyfdev commentedon Aug 3, 2026
I feel they're some difficulties here.
rolldown-plugin-lazy-compilationcurrently is a "normal user plugin", how can we make it to somehow do that "this module I returned is an internal module"? This means we need to provide some "privileges" API to rust plugin API .For those who use rust rolldown, isn't this somehow still a "privilege" that can be observed by outside? I know that rust rolldown users aren't a general usage, but I think is a good angle to judge if we're exposing correct interfaces.