Skip to content

Commit 021e546

Browse files
committed
feat(cache): update package.loaded on require
1 parent b813fae commit 021e546

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/lazy/core/cache.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ function M.load(modkey, modpath)
158158
end
159159

160160
function M.require(modname)
161-
return M.loader(modname)()
161+
local mod = M.loader(modname)()
162+
package.loaded[modname] = mod
163+
return mod
162164
end
163165

164166
---@param modname string

0 commit comments

Comments
 (0)