Vite for Gradle¶
General purpose Gradle plugin to use Vite without preconfigured behavior.
Use Vite in your own terms¶
Use this plugin to integrate Vite into your build processes exactly how you want it.
To avoid manually configuring Vite, use one of the other modules in this project, which are pre-configured to be compatible with other parts of the Gradle ecosystem.
Usage¶
Import the plugin in your build script:
The plugin automatically creates the
viteextension block
, but it creates no tasks nor other behavior. To access it, use the
viteConfigaccessor
.
Task types¶
This plugin exposes multiple task types that you can use to create your own build.
-
WriteConfig
: generate thevite.config.js
file. -
ViteExec
: execute a Vite command.
Note that it is the user's responsibility to install Vite and other dependencies.