@Cr0c , you actually CAN load dependencies on Babylon Native. However, it need to be done on the C++ side where the js scripts get loaded. Usually in the samples we have a ScriptLoader that ir responsible for loading all js scripts required for the application to run (babylon.max.js, and others).
If you have earcut.min.js in your applications folder you can do the following using the ScriptLoader C++ object:
This will make earcut available to babylon.js.
To get the earcut.min.js you can use npm to install it and add it to the list of scripts in CMake file like we do in our samples.
If you need extra instructions on how to do that let me know.