edit basepath to js