switch to new require/es6 API