Meet Vitesse
Vitesse is the quickest way to use Vite with ExpressionEngine. Tell a template which entry points it needs, and Vitesse prints the right tags for them:
- While you work, from Vite's dev server, with hot module replacement: save a stylesheet and the page updates without reloading.
- When you publish, from your build, with the hashed file names, the stylesheets your scripts import, and preloads for the chunks they need.
The template is the same either way:
templates/default_site/_partials/layout.html
<head>
{exp:vitesse:css files="resources/js/app.js"}
</head>
<body>
{layout:contents}
{exp:vitesse:js files="resources/js/app.js"}
</body>
What's in the box
Dev server or build, automatically
Vitesse switches by itself, whenever Vite's dev server starts or stops.
Head and footerStylesheets in the head, scripts at the end, each file once, including the CSS your scripts import.
Images and fontsThe URL of any file Vite processed, for your own markup.
Ready for productionCDN base URLs, Content Security Policy nonces and subresource integrity.
Where to start
Vitesse is free, from the ExpressionEngine add-on store.
- Installation: where to get Vitesse, its requirements, and the folder to copy.
- Setting up Vite: a
vite.config.jsthat works with Vitesse. - Template tags: every tag and parameter.