Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update manifest example #16620

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 35 additions & 23 deletions docs/guide/backend-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,36 @@ If you need a custom integration, you can follow the steps in this guide to conf

```json
{
"main.js": {
"file": "assets/main.4889e940.js",
"src": "main.js",
"_shared-!~{003}~.js": {
"file": "assets/shared-ChJ_j-JJ.css",
"src": "_shared-!~{003}~.js"
},
"_shared-B7PI925R.js": {
"file": "assets/shared-B7PI925R.js",
"name": "shared",
"css": ["assets/shared-ChJ_j-JJ.css"]
},
"baz.js": {
"file": "assets/baz-B2H3sXNv.js",
"name": "baz",
"src": "baz.js",
"isDynamicEntry": true
},
"views/bar.js": {
"file": "assets/bar-gkvgaI9m.js",
"name": "bar",
"src": "views/bar.js",
"isEntry": true,
"dynamicImports": ["views/foo.js"],
"css": ["assets/main.b82dbe22.css"],
"assets": ["assets/asset.0ab0f9cd.png"],
"imports": ["_shared.83069a53.js"]
"imports": ["_shared-B7PI925R.js"],
"dynamicImports": ["baz.js"]
},
"views/foo.js": {
"file": "assets/foo.869aea0d.js",
"file": "assets/foo-BRBmoGS9.js",
"name": "foo",
"src": "views/foo.js",
"isDynamicEntry": true,
"imports": ["_shared.83069a53.js"]
},
"_shared.83069a53.js": {
"file": "assets/shared.83069a53.js",
"css": ["assets/shared.a834bfc3.css"]
"isEntry": true,
"imports": ["_shared-B7PI925R.js"],
"css": ["assets/foo-5UjPuW-k.css"]
}
}
```
Expand Down Expand Up @@ -122,21 +134,21 @@ If you need a custom integration, you can follow the steps in this guide to conf
- Optionally, `<link rel="modulepreload">` tag for the `file` of each imported JavaScript
chunk, again recursively following the imports starting from the entry point chunk.

Following the above example manifest, for the entry point `main.js` the following tags should be included in production:
Following the above example manifest, for the entry point `views/foo.js` the following tags should be included in production:

```html
<link rel="stylesheet" href="assets/main.b82dbe22.css" />
<link rel="stylesheet" href="assets/shared.a834bfc3.css" />
<script type="module" src="assets/main.4889e940.js"></script>
<link rel="stylesheet" href="assets/foo-5UjPuW-k.css" />
<link rel="stylesheet" href="assets/shared-ChJ_j-JJ.css" />
<script type="module" src="assets/foo-BRBmoGS9.js"></script>
<!-- optional -->
<link rel="modulepreload" href="assets/shared.83069a53.js" />
<link rel="modulepreload" href="assets/shared-B7PI925R.js" />
```

While the following should be included for the entry point `views/foo.js`:
While the following should be included for the entry point `views/bar.js`:

```html
<link rel="stylesheet" href="assets/shared.a834bfc3.css" />
<script type="module" src="assets/foo.869aea0d.js"></script>
<link rel="stylesheet" href="assets/shared-ChJ_j-JJ.css" />
<script type="module" src="assets/bar-gkvgaI9m.js"></script>
<!-- optional -->
<link rel="modulepreload" href="assets/shared.83069a53.js" />
<link rel="modulepreload" href="assets/shared-B7PI925R.js" />
```