Currently, several external editor plugins emulate require
using https://github.com/Benjamin-Dobell/luabundle to emulate it in pure lua.
In my opinion, this has at least a couple of downsides:
My suggestion is to use https://www.moonsharp.org/scriptloaders.html to allow bundling modules with a save game. I’m not sure what the appropriate UI for this would be, but the savegame would have a top-level LuaModules
dictionary, that mapped names available to require
to the corresponding text of the module.