Generally the answer to this is that your front end JS isn’t being compiled, so your browser doesn’t understand what import is. It sorta works in Chrome, and same in Firefox if you go into the browser config, otherwise you need to compile it with a module bundler like webpack