Bundle Lua files into one:
lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua"
If target file name is war3map.lua
, inject bundled source to it:
lua-bundler "./example/src/Main.lua" "./example/dist/war3map.lua"
Add -p, --production
to minify bundled lua
lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua" -p
lua-bundler "./example/src/Main.lua" "./example/dist/war3map.lua" -p
Add -e, --exclude
to exclude certain files and directories
lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua" -e "example/src/Reporter.lua"
lua-bundler "./example/src/Main.lua" "./example/dist/bundle.lua" -e "example/src/Reporter.lua;example\src\Dir"
local Module = require("Modules.Module") -- recommended
require("Modules/Module")
require "Modules.Module"
e.g.
pkg . -t node16-win-x64