For example
// entry.js
import allModules from 'virtual:all-modules';
import a from './a.js';
console.log(a);
// a.js
import b from './b.js';
export default b;
// b.js
export default {};
After rollup the virtual:all-modules will be ['entry.js', 'a.js', 'b.js'].
I tried the buildEnd hooks, but it can't run this.load({id: 'virtual:all-modules'}) again, the source code doesn't changed.