zth / rescript-relay-router

MIT License
16 stars 3 forks source link

Change script insertion to `import` for immediate preloads #78

Closed Kingdutch closed 2 years ago

Kingdutch commented 2 years ago

We've been informed by trustable sources that import is equal to a dynamically inserted <script type="module"> (and that async is implied when dynamically inserting scripts).

To simplify our code, for the scripts we want to preload immediately rather than whenever the browser has time we use an asymc import.

zth commented 2 years ago

Great! Merge at will!