Skip to content

Commit 7e360ad

Browse files
chore(docs): typo in templating-function.md
Signed-off-by: JRCode <[email protected]>
1 parent 76daca3 commit 7e360ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/guide/templating-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ As per Vite's documentation, `index.html` is a special file made part of the mod
77

88
When you run the `vite build` command, `index.html` is what Vite automatically looks for. Given this special nature, you probably want to keep it as simple as possible, using HTML comments to specify content placeholders. That's the pattern used across the official SSR examples from [Vite's playground](https://github.com/vitejs/vite/tree/main/packages/playground).
99

10-
**`@fastify/vite`** will automatically add ([decorate](https://fastify.dev/docs/latest/Reference/Decorators/)) a `html()` method on the **Fastify** `Reply` class. This method sends your Vite project's `index.html` to the client with the appropriate media tyope (`text/html`). But it can also replace variable placeholders in your `index.html`. That's because **`@fastify/vite`** packs a helper function that **turns an HTML document with placeholders indicated by HTML comments into a precompiled templating function**:
10+
**`@fastify/vite`** will automatically add ([decorate](https://fastify.dev/docs/latest/Reference/Decorators/)) a `html()` method on the **Fastify** `Reply` class. This method sends your Vite project's `index.html` to the client with the appropriate media type (`text/html`). But it can also replace variable placeholders in your `index.html`. That's because **`@fastify/vite`** packs a helper function that **turns an HTML document with placeholders indicated by HTML comments into a precompiled templating function**:
1111

1212
```js
1313
import { createHtmlTemplateFunction } from '@fastify/vite/utils'

0 commit comments

Comments
 (0)