externalize plugin support, integrate resolve-dep, and add tests for loading plugins