title: Equivalent of AMD's require.toUrl for ES6 modules
body: <p>I'm currently in the process of converting a JavaScript library from AMD modules to ES6 modules. </p>
  
  <p>Some of these modules use <a href="https://github.com/amdjs/amdjs-api/wiki/require#requiretourlstring-" rel="nofollow noreferrer"><strong><code>require.toUrl</code></strong></a> for converting a path from a path relative to the module to a path relative to the base. How can I achieve the same effect in my ES6 modules? </p>
  
  <p>Note that I'm looking for a solution that works not just in webpack, but in any loader or bundler that supports ES6 modules, as well as in browsers that support ES6 modules natively!</p>