An entire additional line of code to call a dependency? Blasphemy.
Would you rather that I inject it into every script with getfenv and make my scripts illegible to static analysis tools?
I’m not vigorously against this feature request, but we’re talking about one line at most. It’s not a big enough deal to warrant an extension of require IMO.
1)
Not sure I dig the idea of this service. We already have 2 types of storages. One that replicates and one that’s server-only. These work fine for storing your modulescripts.
2)
It was suggested that we could use a ‘/’ to traverse this service. This is essentially what we already do though.
require(rs.EnemyLogic.LogicA)
vs
require("EnemyLogic/LogicA")
Those are essentially the same, except one is used everywhere in RBXLua and the other is never seen.
3)
It was suggested that this would be useful if you could recursively search for a modulescript by name and not have to path to it. But we can literally already do this with findFirstChild.
require(rs:findFirstChild("MyModuleScript",true))
In summary: I think these suggestions are all way too niche and nothing suggested can’t already be done with almost the identical amount of code.
I think OP meant an actual service, like ReplicatedStorage, which require() will search in. (although having ModuleScriptService:SetStorage("myPlugin12345",plugin) would be nice)