return function(w)local u=table.clone(w.darkluaRules)for w,T in w do if w=="\100\097\114\107\108\117\097\082\117\108\101\115"then continue end table.insert(u,1,{rule="\105\110\106\101\099\116\095\103\108\111\098\097\108\095\118\097\108\117\101";identifier=w,value=T})end return{generator="\114\101\097\100\097\098\108\101";bundle={modules_identifier="\095\095\068\065\082\075\076\085\065\095\066\085\078\068\076\069\095\077\079\068\085\076\069\083",require_mode={name="\112\097\116\104",sources={client="\046\046\047\109\111\100\117\108\101\115\047\099\108\105\101\110\116";server="\046\046\047\109\111\100\117\108\101\115\047\115\101\114\118\101\114",shared="\046\046\047\109\111\100\117\108\101\115\047\115\104\097\114\101\100"}}},rules=u}end
return function(config)
	local rules = table.clone(config.darkluaRules)
	for k, v in config do
		if k == "darkluaRules" then
			continue
		end

		table.insert(rules, 1, {
			rule = "inject_global_value",
			identifier = k,
			value = v,
		})
	end

	return {
		generator = "readable",
		bundle = {
			modules_identifier = "__DARKLUA_BUNDLE_MODULES",
			require_mode = {
				name = "path",
				sources = {
					-- Use ../ to jump out of the "build" folder
					client = "../modules/client",
					server = "../modules/server",
					shared = "../modules/shared",
				},
			},
		},

		rules = rules,
	}
end
