port package config behavior from requirejs