Plugins include hot reload support, meta tags, defines, build pipeline, PWA, and more.
Using PWA
How to add PWA support to your vite project:
Install the vite pwa plugin: npm install vite-plugin-pwa --save-dev
Add the following to your vite.config.js:
You first pass the PWAOptions to the needlePlugins function, then you pass the same PWAOptions to the VitePWA plugin.
You can use also add a .webmanifest file to your web project and edit the PWA manifest settings there.
When used without arguments (e.g. in a SvelteKit defineConfig({}) plain object),
the command is resolved automatically from Vite's configResolved hook.
Needle Engine plugins for Vite
Plugins include hot reload support, meta tags, defines, build pipeline, PWA, and more.
Using PWA
How to add PWA support to your vite project:
npm install vite-plugin-pwa --save-dev.webmanifestfile to your web project and edit the PWA manifest settings there.When used without arguments (e.g. in a SvelteKit
defineConfig({})plain object), the command is resolved automatically from Vite'sconfigResolvedhook.