dimport icon indicating copy to clipboard operation
dimport copied to clipboard

Dynamically importing relative paths

Open jpray opened this issue 6 years ago • 0 comments

In comparing the dimport legacy importer with Chrome's native importer, I am noticing a discrepancy in how paths are resolved.

In chrome, I see the following happening...

Given the following structure: /index.html /foo/main.js /foo/dynamic-component.js

if /foo/main.js has the following code

import('./dynamic-component.js');

Chrome loads the file fine. When testing in Firefox using the legacy importer it is looking for the file in /dynamic-component.js instead of /foo/dynamic-component.js and 404s. I haven't tested the module/nomodule versions to see if there is any difference with them.

jpray avatar Apr 21 '19 22:04 jpray