update wrapper for build to pass in global object.