Wraps the module source in a load call, and returns a function searcher executed as an IIFE. Resulting function in the package.preload table is a valid searcher than returns a function that when executed loads the module from source.
Tested using deploy stage to dynamically reload code both within driver.lua (which this change doesn't impact) as well as all required files (which this change specifically addresses).
Prior to change, updated code in files included via require were not updated when deploying the changes via LUA_COMMANDS. After this change, modifications made to included files via require reflect changes deployed in new bundle.
Wraps the module source in a
load
call, and returns a function searcher executed as an IIFE. Resulting function in thepackage.preload
table is a valid searcher than returns a function that when executed loads the module from source.Tested using deploy stage to dynamically reload code both within
driver.lua
(which this change doesn't impact) as well as all required files (which this change specifically addresses).Prior to change, updated code in files included via
require
were not updated when deploying the changes viaLUA_COMMANDS
. After this change, modifications made to included files viarequire
reflect changes deployed in new bundle.