Skip to content

Commit a0e1a04

Browse files
authored
docs(vite): fix description of transformIndexHtml hook (#19799)
1 parent 3e87335 commit a0e1a04

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/vite/src/node/plugin.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,13 @@ export interface Plugin<A = any> extends RollupPlugin<A> {
292292
* The hook receives the following arguments:
293293
*
294294
* - html: string
295-
* - ctx?: vite.ServerContext (only present during serve)
296-
* - bundle?: rollup.OutputBundle (only present during build)
295+
* - ctx: IndexHtmlTransformContext, which contains:
296+
* - path: public path when served
297+
* - filename: filename on disk
298+
* - server?: ViteDevServer (only present during serve)
299+
* - bundle?: rollup.OutputBundle (only present during build)
300+
* - chunk?: rollup.OutputChunk
301+
* - originalUrl?: string
297302
*
298303
* It can either return a transformed string, or a list of html tag
299304
* descriptors that will be injected into the `<head>` or `<body>`.

0 commit comments

Comments
 (0)