I'm in a bit of a pickle - I am attempting to have an essential script and its dependencies preload on my SPA app.
The setup I have is roughly:
<head>
...
<link
rel="preload"
href="/app.js"
as="script"
crossorigin="anonymous"
/>
<link
rel="preload"
href="/dependency.js"
as="script"
crossorigin="anonymous"
/>
...
</head>
<body>
...
<script src="/app.js" type="module"></script>
...
</body>
This works excellently for Safari and Chromium derivatives (as evidenced by the Network developer panel), but not Firefox. I am greeted with the console hint ...Make sure all attributes of the preload tag are set correctly. If rel="modulepreload" is used, it works on Chromium and Firefox, but not Safari (this property seems new / not well supported).
Am I missing something? I feel like I'm looking over something very simple, and for the life of me I cannot get it to work on Firefox. Any pointers are much appreciated.