The quickest way to use Vite with ExpressionEngine: one tag loads your files from Vite’s dev server while you work, and from your optimized build when you publish.
Vitesse brings Vite to ExpressionEngine templates. Tell a template which entry points it needs, and Vitesse prints the right tags. It’s free.
One template, two modes. While Vite’s dev server runs, Vitesse loads your source files from it with hot module replacement, so the page updates as you save. After vite build, it loads the hashed, production files from Vite’s manifest. It switches by itself, with nothing to change between working and publishing.
The details, handled
Ready for production. Serve builds from a CDN, add a Content Security Policy nonce to every tag, and use subresource integrity hashes from your manifest. Set everything once in config.php, or per tag.
The documentation includes a complete vite.config.js to get you started.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.