Skip to content

Commit

Permalink
feat(cache): update package.loaded on require
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 28, 2022
1 parent b813fae commit 021e546
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazy/core/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ function M.load(modkey, modpath)
end

function M.require(modname)
return M.loader(modname)()
local mod = M.loader(modname)()
package.loaded[modname] = mod
return mod
end

---@param modname string
Expand Down

0 comments on commit 021e546

Please sign in to comment.