Optimizes handling of script dependencies with requirejs