-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Documentation is
- Missing
- Outdated
- Confusing
- Not sure?
Explain in Detail
This is a follow up to #16525 / #20524.
The page presumes 4 steps to load a manifest.json file, yet there seem to be edge cases which are not discussed.
Assuming the manifest file in the guide has the following additions/changes:
"_test-ABCdeFG9.css": {
"file": "assets/test-ABCdeFG9.css",
"imports": ["logo.svg"],
"css": ["assets/test2-ABCdeFG0.css"]
}
"views/foo.js": {
"imports": ["_shared-B7PI925R.js", "_test-ABCdeFG9.css", "_shared-ChJ_j-JJ.css"],
...
}
- Is the manifest file valid?
- If not, what exactly is invalid?
- How should a parser handle an imported
ManifestChunk
where file is of type "css"?
Your Suggestion for Changes
Add this more complicated example, and update the steps and final HTML appropriately.
Strictly reading the existing steps and pseudo code a parser would produce:
<link rel="stylesheet" href="assets/foo-5UjPuW-k.css" />
<link rel="stylesheet" href="assets/shared-ChJ_j-JJ.css" />
<link rel="stylesheet" href="assets/test2-ABCdeFG0.css" />
<script type="module" src="assets/foo-BRBmoGS9.js"></script>
<!-- optional -->
<link rel="modulepreload" href="assets/shared-B7PI925R.js" />
<link rel="modulepreload" href="assets/test-ABCdeFG9.css" />
<link rel="modulepreload" href="assets/assets/logo-BuPIv-2h.svg" />
<link rel="modulepreload" href="assets/shared-ChJ_j-JJ.css" />
Which does not seem correct.
Reproduction
https://vite.dev/guide/backend-integration.html
Steps to reproduce
No response
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation