Interface: VitePluginOptions

August 23, 2024 ยท View on GitHub

@sdeverywhere/plugin-vite / VitePluginOptions

Interface: VitePluginOptions

Properties

name

name: string

The name to include in log messages.


config

config: InlineConfig

The Vite config to use.


apply

Optional apply: Object

Specifies the behavior of the plugin for different sde build modes.

Type declaration

NameType
development?"skip" | "post-generate" | "post-build" | "watch" | "serve"
production?"skip" | "post-generate" | "post-build"

development?: "skip" | "post-generate" | "post-build" | "watch" | "serve"

The behavior of the plugin when sde is configured for development mode.

If left undefined, defaults to 'post-build'.

  • skip: Don't run the plugin.
  • post-generate: Run vite build in the postGenerate phase.
  • post-build: Run vite build in the postBuild phase.
  • watch: Run vite build in the watch callback (rebuilds the library when changes are detected in source files); useful for libraries.
  • serve: Run vite dev (sets up local server and refreshes the app automatically when changes are detected); useful for applications.

production?: "skip" | "post-generate" | "post-build"

The behavior of the plugin when sde is configured for production mode.

If left undefined, defaults to 'post-build'.

  • skip: Don't run the plugin.
  • post-generate: Run vite build in the postGenerate phase.
  • post-build: Run vite build in the postBuild phase.