Referencing another lua file on ESP32 with require()

Has anyone had any luck using require() in a Lua file to reference another Lua file’s modules after uploading the two files to the ESP32 as a Filesystem Image?

I’m sure there’s a complicated way to do it, and naturally, it’s not working straight out of the box with default Lua! It seems a little tricky so if anyone has a strategy, I’d love to hear it!

Ok, I found a nice simple solution:

Just use the spiffs filesystem, upload your lua files and reference it by using “/spiffs/” instead of “./” in luaconf.h