66description : Vite plugin API
77---
88
9+ import { Type , MetaInfo } from " ~/components" ;
10+
911## ` cloudflare() `
1012
1113The ` cloudflare ` plugin should be included in the Vite ` plugins ` array:
@@ -23,14 +25,14 @@ It accepts an optional `PluginConfig` parameter.
2325
2426## ` interface PluginConfig `
2527
26- - ` configPath?: string `
28+ - ` configPath ` < Type text = ' string' /> < MetaInfo text = ' optional ' />
2729
2830 An optional path to your Worker config file.
2931 By default, a ` wrangler.jsonc ` , ` wrangler.json ` , or ` wrangler.toml ` file in the root of your application will be used as the Worker config.
3032
3133 For more information about the Worker configuration, see [ Configuration] ( /workers/wrangler/configuration/ ) .
3234
33- - ` viteEnvironment?: { name?: string } `
35+ - ` viteEnvironment ` < Type text = ' { name?: string }' /> < MetaInfo text = ' optional ' />
3436
3537 Optional Vite environment options.
3638 By default, the environment name is the Worker name with ` - ` characters replaced with ` _ ` .
@@ -39,21 +41,21 @@ It accepts an optional `PluginConfig` parameter.
3941
4042 See [ Vite Environments] ( /workers/vite-plugin/reference/vite-environments/ ) for more information.
4143
42- - ` persistState?: boolean | { path: string } `
44+ - ` persistState ` < Type text = ' boolean | { path: string }' /> < MetaInfo text = ' optional ' />
4345
4446 An optional override for state persistence.
4547 By default, state is persisted to ` .wrangler/state ` .
4648 A custom ` path ` can be provided or, alternatively, persistence can be disabled by setting the value to ` false ` .
4749
48- - ` inspectorPort?: number | false `
50+ - ` inspectorPort ` < Type text = ' number | false' /> < MetaInfo text = ' optional ' />
4951
5052 An optional override for debugging your Workers.
5153 By default, the debugging inspector is enabled and listens on port ` 9229 ` .
5254 A custom port can be provided or, alternatively, setting this to ` false ` will disable the debugging inspector.
5355
5456 See [ Debugging] ( /workers/vite-plugin/reference/debugging/ ) for more information.
5557
56- - ` auxiliaryWorkers?: Array<AuxiliaryWorkerConfig> `
58+ - ` auxiliaryWorkers ` < Type text = ' Array<AuxiliaryWorkerConfig>' /> < MetaInfo text = ' optional ' />
5759
5860 An optional array of auxiliary Workers.
5961 Auxiliary Workers are additional Workers that are used as part of your application.
@@ -69,13 +71,13 @@ You can inspect the `dist` directory and then run `wrangler deploy -c dist/<auxi
6971
7072## ` interface AuxiliaryWorkerConfig `
7173
72- - ` configPath: string `
74+ - ` configPath ` < Type text = ' string' />
7375
7476 A required path to your Worker config file.
7577
7678 For more information about the Worker configuration, see [ Configuration] ( /workers/wrangler/configuration/ ) .
7779
78- - ` viteEnvironment?: { name?: string } `
80+ - ` viteEnvironment ` < Type text = ' { name?: string }' /> < MetaInfo text = ' optional ' />
7981
8082 Optional Vite environment options.
8183 By default, the environment name is the Worker name with ` - ` characters replaced with ` _ ` .
0 commit comments