Skip to content

Commit 57d3023

Browse files
authored
docs: transformIndexHtml order note (#13318)
1 parent e3db771 commit 57d3023

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/guide/api-plugin.md

+2
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo
345345
- An array of tag descriptor objects (`{ tag, attrs, children }`) to inject to the existing HTML. Each tag can also specify where it should be injected to (default is prepending to `<head>`)
346346
- An object containing both as `{ html, tags }`
347347

348+
By default `order` is `undefined`, with this hook applied after the html has been transformed. In order to inject a script that should go through the Vite plugins pipeline, `order: 'pre'` will apply the hook before processing the HTML. `order: 'post'` applies the hook after all hooks with `order` undefined are applied.
349+
348350
**Basic Example:**
349351

350352
```js

0 commit comments

Comments
 (0)