mirror of
https://github.com/isledecomp/isle.pizza.git
synced 2026-02-28 22:07:39 +00:00
- Replace vanilla JS with Svelte 5 components - Add Vite build system with Terser optimization - Reorganize assets into src/ and public/ directories - Update README with setup instructions
15 lines
515 B
JavaScript
15 lines
515 B
JavaScript
// Injects the workbox manifest into the service worker
|
|
// Config is loaded from workbox-config-vite.js for easy editing
|
|
import {injectManifest} from 'workbox-build';
|
|
import {createRequire} from 'module';
|
|
|
|
const require = createRequire(import.meta.url);
|
|
const config = require('../workbox-config.cjs');
|
|
|
|
injectManifest(config).then(({count, size}) => {
|
|
console.log(`Precached ${count} files, totaling ${size} bytes.`);
|
|
}).catch((err) => {
|
|
console.error('Workbox injection failed:', err);
|
|
process.exit(1);
|
|
});
|