rewrite imports and modules loading with es6