From ad01f8c1cd6e5d671b0e0284cd40aed585ffa3e4 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Tue, 18 Feb 2025 20:02:40 +0100 Subject: [PATCH] Finally fixxed i guess --- src/elementManager.lua | 2 +- tools/bundler.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/elementManager.lua b/src/elementManager.lua index 0ac9f69..ac5fb3a 100644 --- a/src/elementManager.lua +++ b/src/elementManager.lua @@ -62,7 +62,7 @@ if(minified)then if(minified_elementDirectory==nil)then error("Unable to find minified_elementDirectory please report this bug to our discord.") end - for name,v in pairs(minfied_elementDirectory)do + for name,v in pairs(minified_elementDirectory)do ElementManager._elements[name:gsub(".lua", "")] = { class = nil, plugins = {}, diff --git a/tools/bundler.lua b/tools/bundler.lua index cd517fe..b02e54d 100644 --- a/tools/bundler.lua +++ b/tools/bundler.lua @@ -21,8 +21,9 @@ local function bundle() 'local minified_elementDirectory = {}\n', 'local minified_pluginDirectory = {}\n', 'local project = {}\n', + 'local loadedProject = {}\n', 'local baseRequire = require\n', - 'require = function(path) return project[path..".lua"] or baseRequire(path) end\n' + 'require = function(path) if(project[path..".lua"])then if(loadedProject[path]==nil)then loadedProject[path] = project[path..".lua"]() end return loadedProject[path] end baseRequire(path) end\n' } for _, file in ipairs(files) do