loader: port to es6