Skip to content

Creating an Application ​

The repository demo shows the supported Vite integration. Its vite.config.js installs the .sprig compiler plugin, and src/main.js mounts the app:

js
import AppShell from './app/AppShell.sprig';
import { mount, Sprig } from 'sprig-framework';
import appCss from './assets/app.css?url';

Sprig.css(appCss);
mount('#app', AppShell);

Build the framework bundles before an app-only build; npm run dev and npm run build do this automatically. The .sprig compiler plugin is currently a repository source module, so the checkout is the reference integration rather than a public compiler-plugin install recipe. Optional integrations, such as Progressive Web Apps, can be added to the app's Vite config. See Quick Start and Production Deployment.