Skip to content

FF does not grok await import('./loadmodule') - file not found #5

@hilbix

Description

@hilbix

This should be investigated.

loadmain tries to import loadmodule and for some reason this does not work because the file is not found (so the .js is not automatically added).

Perhaps this has something to do how I did my tests. AFAICS I tested this with Apache, and it might be that Apache automagically adds the .js suffix for the requested MimeType. Or whatever. I really have no idea because I know it worked at my side. Somehow. But not on some other site which uses NginX.

Adding .js fixes the issue for me. But I am still puzzled why this happened.

This sadly exposes some other things. The .js extension is a PITA.

Hence the probably correct fix is to remove the .js artificially. Which will make things more easy to access (as . is used in JS for object notation) even if .js is used by purpose. This would only make trouble if you have a module named NAME and a second module named NAME.js which are both JavaScript. But is this really something valid to consider? I do not think so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions