import module from 'node:module'
const tree = new FileTree('site', import.meta.url)
module.registerHooks(hooks.useTree(tree))
import('site/myfile.js')
Here, site/myfile.js doesn't exist. It gets created as a reference by the FileTree library. Node thinks it is importing it. The import is also automatically reloaded, if the backend changes it. Caches are invalidated and objects replaced.