diff --git a/module/deps/cpp-sdk b/module/deps/cpp-sdk index 5e83e8a..7398cbf 160000 --- a/module/deps/cpp-sdk +++ b/module/deps/cpp-sdk @@ -1 +1 @@ -Subproject commit 5e83e8a3113bf595cc237370813520d6e7b3df2f +Subproject commit 7398cbf54d41077538c741eeec446162d6303c27 diff --git a/module/src/runtime.cpp b/module/src/runtime.cpp index 0aefb38..6647494 100644 --- a/module/src/runtime.cpp +++ b/module/src/runtime.cpp @@ -35,24 +35,12 @@ void JSBytecodeRuntime::ProcessClientFile(alt::IResource* resource, alt::IPackag if(!result) return; // Compile the extra files - alt::config::Node config = resource->GetConfig(); - alt::config::Node& node = config["extra-compile-files"]; - if(node && node.IsList()) + std::vector extraFilePatterns = resource->GetConfigStringList("extra-compile-files"); + std::set files = resource->GetMatchedFiles(extraFilePatterns); + for(const std::string& file : files) { - alt::config::Node::List& list = node.ToList(); - std::vector extraFilePatterns; - extraFilePatterns.reserve(list.size()); - for(alt::config::Node& item : list) - { - if(item.IsScalar()) extraFilePatterns.push_back(item.ToString()); - } - - std::set files = resource->GetMatchedFiles(extraFilePatterns); - for(const std::string& file : files) - { - bool result = compiler.CompileModule(file, false); - if(!result) return; - } + bool result = compiler.CompileModule(file, false); + if(!result) return; } // Write all other files normally