Zero-config PWA Assets Generator
See the code
Zero-config PWA Assets Generator
From v2.0.0
@vite-pwa/assets-generatorrequires Node 20.19.0 or above
# npm
npm i @vite-pwa/assets-generator -D
# yarn
yarn add @vite-pwa/assets-generator -D
# pnpm
pnpm add @vite-pwa/assets-generator -D
Create pwa-assets.config.js or pwa-assets.config.ts file in your root project folder and configure a preset and the images to use to generate the PWA assets:
import { defineConfig, minimal2023Preset as preset } from '@vite-pwa/assets-generator/config'
export default defineConfig({
preset,
images: [
'public/logo.svg',
'public-dev/logo.svg'
]
})
then, add the following script to your package.json and run it:
{
"scripts": {
"generate-pwa-assets": "pwa-assets-generator"
}
}
Read the ๐ documentation for a complete guide on how to configure and use
@vite-pwa/assets-generator CLI.
To use this library programmatically, check out the API documentation.
Check out the type declaration src/config.ts for more details.
MIT License ยฉ 2023-PRESENT Anthony Fu
3,282 followers ยท starred Jul 2023
117 followers ยท starred Apr 2026
54 followers ยท starred Jun 2026
7 followers ยท starred Jun 2023
Zero-config PWA Assets Generator
See the code
Zero-config PWA Assets Generator
From v2.0.0
@vite-pwa/assets-generatorrequires Node 20.19.0 or above
# npm
npm i @vite-pwa/assets-generator -D
# yarn
yarn add @vite-pwa/assets-generator -D
# pnpm
pnpm add @vite-pwa/assets-generator -D
Create pwa-assets.config.js or pwa-assets.config.ts file in your root project folder and configure a preset and the images to use to generate the PWA assets:
import { defineConfig, minimal2023Preset as preset } from '@vite-pwa/assets-generator/config'
export default defineConfig({
preset,
images: [
'public/logo.svg',
'public-dev/logo.svg'
]
})
then, add the following script to your package.json and run it:
{
"scripts": {
"generate-pwa-assets": "pwa-assets-generator"
}
}
Read the ๐ documentation for a complete guide on how to configure and use
@vite-pwa/assets-generator CLI.
To use this library programmatically, check out the API documentation.
Check out the type declaration src/config.ts for more details.
MIT License ยฉ 2023-PRESENT Anthony Fu
3,282 followers ยท starred Jul 2023
117 followers ยท starred Apr 2026
54 followers ยท starred Jun 2026
7 followers ยท starred Jun 2023