Skip to content

Commit

Permalink
docs: transformIndexHtml order note (#13318)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed May 24, 2023
1 parent e3db771 commit 57d3023
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/guide/api-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo
- 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>`)
- An object containing both as `{ html, tags }`

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.

**Basic Example:**

```js
Expand Down

0 comments on commit 57d3023

Please sign in to comment.