GoogleChromeLabs/dynamic-import-polyfill

Use `document.baseURI` instead of location

LarsDenBakker opened this issue · 0 comments

When using SPA routing, you don't want module import URLs to change when the browser URL changes. If you use document.baseURI instead of location to resolve imports relatively, it takes the document <base href="..."> into account. This mimics the behaviour of other relative requests in the browser.