Skip to content

Commit

Permalink
docs: use href attribute for link with rel=modulepreload (#16279)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laupetin committed Mar 27, 2024
1 parent 1d9a042 commit c2d0b88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/guide/backend-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If you need a custom integration, you can follow the steps in this guide to conf
<script type="module" src="/{{ manifest[name].file }}"></script>

<!-- for chunk of importedChunks(manifest, name) -->
<link rel="modulepreload" src="/{{ chunk.file }}" />
<link rel="modulepreload" href="/{{ chunk.file }}" />
```

Specifically, a backend generating HTML should include the following tags given a manifest
Expand All @@ -129,7 +129,7 @@ If you need a custom integration, you can follow the steps in this guide to conf
<link rel="stylesheet" href="assets/shared.a834bfc3.css" />
<script type="module" src="assets/main.4889e940.js"></script>
<!-- optional -->
<link rel="modulepreload" src="assets/shared.83069a53.js" />
<link rel="modulepreload" href="assets/shared.83069a53.js" />
```

While the following should be included for the entry point `views/foo.js`:
Expand All @@ -138,5 +138,5 @@ If you need a custom integration, you can follow the steps in this guide to conf
<link rel="stylesheet" href="assets/shared.a834bfc3.css" />
<script type="module" src="assets/foo.869aea0d.js"></script>
<!-- optional -->
<link rel="modulepreload" src="assets/shared.83069a53.js" />
<link rel="modulepreload" href="assets/shared.83069a53.js" />
```

0 comments on commit c2d0b88

Please sign in to comment.