Use server.moduleGraph.getModuleByUrl to load the remix entry point module.
From my testing using ssrLoadModule will cause the entry.server file to be loaded and transformed twice.
The first time this module loads is by the remix plugin, and the again in this plugin.
Using the moduleGraph API we can retrieve a module from the cache without reloading it.
Fixes #24 Work in progress, for discussion.
Use
server.moduleGraph.getModuleByUrl
to load the remix entry point module.From my testing using ssrLoadModule will cause the
entry.server
file to be loaded and transformed twice. The first time this module loads is by the remix plugin, and the again in this plugin.Using the moduleGraph API we can retrieve a module from the cache without reloading it.