forked from external-repos/noisedash
Add PWA support and service worker for offline capabilities
Some checks failed
build-and-push-docker / docker (push) Failing after 1m15s
Some checks failed
build-and-push-docker / docker (push) Failing after 1m15s
- Create .devcontainer/devcontainer.env and .devcontainer/devcontainer.json for development environment configuration - Add Gitea Actions README and Docker workflow for building and pushing images - Update package.json to include @vue/cli-plugin-pwa - Enhance index.html with manifest link and theme color - Create public/manifest.webmanifest for PWA configuration - Implement service worker registration and media session management in registerServiceWorker.js - Update main.js to register the service worker - Configure vue.config.js for PWA settings and caching strategies
This commit is contained in:
@@ -3,6 +3,48 @@ module.exports = {
|
||||
'vuetify'
|
||||
],
|
||||
devServer: {
|
||||
proxy: 'http://localhost:1432'
|
||||
host: '0.0.0.0',
|
||||
port: 8080,
|
||||
allowedHosts: 'all',
|
||||
proxy: 'http://localhost:1432'
|
||||
},
|
||||
pwa: {
|
||||
name: 'Noisedash',
|
||||
themeColor: '#121212',
|
||||
backgroundColor: '#121212',
|
||||
display: 'standalone',
|
||||
startUrl: '/',
|
||||
manifestOptions: {
|
||||
short_name: 'Noisedash',
|
||||
description: 'Ambient noise generator',
|
||||
categories: ['music', 'audio', 'productivity'],
|
||||
display_override: ['standalone', 'browser'],
|
||||
orientation: 'any'
|
||||
},
|
||||
iconPaths: {
|
||||
favicon32: 'favicon.ico',
|
||||
favicon16: 'favicon.ico',
|
||||
appleTouchIcon: 'favicon.ico',
|
||||
maskIcon: 'favicon.ico',
|
||||
msTileImage: 'favicon.ico'
|
||||
},
|
||||
workboxPluginMode: 'GenerateSW',
|
||||
workboxOptions: {
|
||||
cleanupOutdatedCaches: true,
|
||||
skipWaiting: true,
|
||||
clientsClaim: true,
|
||||
offlineGoogleAnalytics: false,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /\.(?:png|jpg|jpeg|svg|gif|webp|mp3|wav|ogg)$/,
|
||||
handler: 'CacheFirst',
|
||||
options: {
|
||||
cacheName: 'assets-cache',
|
||||
expiration: { maxEntries: 60, maxAgeSeconds: 7 * 24 * 60 * 60 },
|
||||
cacheableResponse: { statuses: [0, 200] }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user