change order of dependencies for pkg to be last assuming dependencies should be loaded first in javascript