waymarkedtrails / waymarked-trails-site

Main repository for issue tracking and discussions for waymarkedetrails
http://waymarkedtrails.org
GNU General Public License v3.0
109 stars 24 forks source link

waymarkedtrails no longer works with older browsers #405

Open ljb279 opened 2 years ago

ljb279 commented 2 years ago

I have used Waymarkedtrails with the Seamonkey browser (https://www.seamonkey-project.org/) but recently the site no longer works. Only a blank page is displayed.

My browser error log has this:

Error: SyntaxError: import declarations may only appear at top level of a module
  Source File: https://hiking.waymarkedtrails.org/
  Line: 40, Column: 8
  Source Code:
        import('/build/main.js')

Sorry, I can't pin down exactly when this started. Is this a browser problem, or a site problem?

lonvia commented 2 years ago

The new version of the site needs a browser with ES2020 compatibility. According to MDN that means Firefox 67. Seamonkey looks to be stuck with Firefox 60.

There is probably a lot that can be done with the help of Babel in terms of compatibility for older browsers. But it's the kind of rabbit hole that is hard to get out of once you are inside. So I'm sorry to say that I probably won't spend time on it.

I will happily take Pull Requests, though. The repo in question is https://github.com/waymarkedtrails/waymarkedtrails-website. This is a simple Svelte/Javascript application. You don't need to set up a full database to contribute. It happily runs against the API on waymarkedtrails.org.

ljb279 commented 2 years ago

Thanks for the info. I posted on a Seamonkey list/group and got a reply from (I think) one of the developers, who said your site is using a dynamic module import from the ES2020 spec which is not supported by Seamonkey yet; eventually will be but not for at least a few months.

(Not clear why you said ES6 and they said ES2020 but same result.)

I absolutely agree this is not worth changing on waymarkedtrails.org. As another example, I am using Firefox to add this comment because github is really flakey with Seamonkey.

lonvia commented 2 years ago

I've edited my comment regarding ES2020. For others with a similar issue, here is the compatibility list from caniuse: https://caniuse.com/es6-module-dynamic-import