Skip to content

Commit a7e25a9

Browse files
committed
Update docs
1 parent 8ad0bb0 commit a7e25a9

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

  • app/pages/6.0
    • 08.pages-and-layout/04.filters-and-functions
    • 23.upgrading/01.51-to-60/03.guide

app/pages/6.0/08.pages-and-layout/04.filters-and-functions/docs.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@ Preloads assets for better performance by telling the browser to fetch them earl
7878

7979
This generates `<link rel="modulepreload">` tags for JavaScript modules and `<link rel="preload">` tags for other assets, allowing the browser to fetch them in parallel with the page load.
8080

81+
#### vite_css_preload
82+
83+
Emits `<link rel="preload" as="style">` hints specifically for CSS files associated with an entry point:
84+
85+
```twig
86+
{{ vite_css_preload('main.ts') }}
87+
```
88+
89+
This tells the browser to start fetching your stylesheets as early as possible, before the CSS `<link>` tags are processed. It's typically called just before `vite_css()` in your layout template to improve perceived load performance:
90+
91+
```twig
92+
{{ vite_css_preload('main.ts') }}
93+
{{ vite_css('main.ts') }}
94+
```
95+
8196
> [!NOTE]
8297
> Further information on how to use these functions and how they work under the hood will be covered in the [Assets and Vite](/assets-vite) chapter.
8398

app/pages/6.0/23.upgrading/01.51-to-60/03.guide/docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ Replace the contents of your `package.json` to match the 6.0 structure. The chan
169169
"@modyfi/vite-plugin-yaml": "^1.1.1",
170170
"@types/uikit": "^3.14.5",
171171
"@vitejs/plugin-vue": "^5.0.4",
172-
"@vitest/coverage-v8": "^3.1.1",
172+
"@vitest/coverage-v8": "^4.1.0",
173173
"@vue/test-utils": "^2.4.6",
174174
"happy-dom": "^20.0.2",
175175
"less": "^4.2.0",
176176
"typescript": "^5.4.5",
177177
"vite": "^6.4.1",
178178
"vite-plugin-vue-devtools": "^7.5.4",
179-
"vitest": "^3.1.1",
179+
"vitest": "^4.1.0",
180180
"vue-tsc": "^2.1.10"
181181
},
182182
"scripts": {

0 commit comments

Comments
 (0)