Documentation is
Explain in Detail
Following the backend integration guide, I've written a Composer package for vanilla PHP integration, and I hope you can clarify something from the example in the documentation here.
My question is regarding the example near the end of the page:
|
While the following should be included for the entry point `views/foo.js`: |
|
|
|
```html |
|
<link rel="stylesheet" href="assets/shared.a834bfc3.css" /> |
|
<script type="module" src="assets/foo.869aea0d.js"></script> |
|
<!-- optional --> |
|
<link rel="modulepreload" href="assets/shared.83069a53.js" /> |
|
``` |
The example manifest.json on this page shows views/foo.js being a dynamic entry:
|
"views/foo.js": { |
|
"file": "assets/foo.869aea0d.js", |
|
"src": "views/foo.js", |
|
"isDynamicEntry": true, |
|
"imports": ["_shared.83069a53.js"] |
|
}, |
My question is, when or why would you be preloading a dynamic entry?
To the best of my understanding, a dynamic is loaded dynamically - which, as I understand it, would mean you're not emitting tags on a page, but rather loading the script with an await import statement somewhere in the main script?
Is there any real world use case for an entry with isDynamicEntry to be (pre) loaded on a page?
If this is an error, I might prefer for my package to throw an exception for this case.
Your Suggestion for Changes
The page may need some clarification per my question above. Not sure. 🙂
Reproduction
No response
Steps to reproduce
No response
Documentation is
Explain in Detail
Following the backend integration guide, I've written a Composer package for vanilla PHP integration, and I hope you can clarify something from the example in the documentation here.
My question is regarding the example near the end of the page:
vite/docs/guide/backend-integration.md
Lines 135 to 142 in 6a7dde5
The example
manifest.jsonon this page showsviews/foo.jsbeing a dynamic entry:vite/docs/guide/backend-integration.md
Lines 74 to 79 in 6a7dde5
My question is, when or why would you be preloading a dynamic entry?
To the best of my understanding, a dynamic is loaded dynamically - which, as I understand it, would mean you're not emitting tags on a page, but rather loading the script with an
await importstatement somewhere in the main script?Is there any real world use case for an entry with
isDynamicEntryto be (pre) loaded on a page?If this is an error, I might prefer for my package to throw an exception for this case.
Your Suggestion for Changes
The page may need some clarification per my question above. Not sure. 🙂
Reproduction
No response
Steps to reproduce
No response