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
We have some customized lua require rules in our project. It would be very helpful if Teal can provide an interface that let us define custom module require rules.
I would imagine something like this in tlconfig.lua:
In our use case, require same literal string may end up with different target modules depending on the current file location. And since we have multiple lua vms, we also encoded this information in the require string (e.g, require("ModuleA:Simulation")), which cannot be achieved without custom module require.
Another useful use case I can think of is to achieve something what people do to lua library that require a module name actually require that module's lua entry point (e.g., require("ModuleA") actually require ModuleA/init.lua). With custom module require, we can achieve same thing in Teal.
The text was updated successfully, but these errors were encountered:
We have some customized lua
require
rules in our project. It would be very helpful if Teal can provide an interface that let us define custom module require rules.I would imagine something like this
in tlconfig.lua
:In our use case,
require
same literal string may end up with different target modules depending on the current file location. And since we have multiple lua vms, we also encoded this information in the require string (e.g,require("ModuleA:Simulation")
), which cannot be achieved without custom module require.Another useful use case I can think of is to achieve something what people do to lua library that require a module name actually require that module's lua entry point (e.g.,
require("ModuleA")
actually requireModuleA/init.lua
). With custom module require, we can achieve same thing in Teal.The text was updated successfully, but these errors were encountered: