Lately working with svelte in a project. The generated HTML uses Javascript with link and modulepreload:
<!doctype html>
<html>
<head>
...
<link rel="modulepreload" href="./_app/immutable/entry/start.ed2a2ab5.js">
<link rel="modulepreload" href="./_app/immutable/chunks/scheduler.8a566589.js">
<link rel="modulepreload" href="./_app/immutable/chunks/singletons.a436eea2.js">
<link rel="modulepreload" href="./_app/immutable/chunks/index.220c2c81.js">
<link rel="modulepreload" href="./_app/immutable/entry/app.e682a49a.js">
<link rel="modulepreload" href="./_app/immutable/chunks/index.95a0b3d5.js">
<link rel="modulepreload" href="./_app/immutable/nodes/0.77b736d5.js">
<link rel="modulepreload" href="./_app/immutable/nodes/2.87586eb9.js">
</head>
<body>
...
<script>
// some scripts here to use the preloaded module code.
</script>
</body>
</html>
How do I declare in mymodule.libraries.yml so files can be displayed as this link format?
hook_page_attachments_alter()and addhtml_headitems instead, e.g. drupal.stackexchange.com/questions/301098/…