Skip to content

Commit

Permalink
Offline support (for PWA)
Browse files Browse the repository at this point in the history
  • Loading branch information
SavageCore committed Sep 24, 2023
1 parent b2fcde1 commit fd49adb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ dev-dist
coverage

public/*
!public/vite.svg
!public/logo.svg
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PD3 Vault Cracker</title>

<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="apple-touch-icon" href="/pwa-192x192.png">
<link rel="mask-icon" href="/favicon.ico" color="#FFFFFF">
<meta name="theme-color" content="#ffffff">

<title>PD3 Vault Cracker</title>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ export default defineConfig({
plugins: [
svelte(),
VitePWA({
registerType: 'autoUpdate',
registerType: 'prompt',
devOptions: {
enabled: true,
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
},
manifest: {
name: 'PD3 Vault Cracker',
short_name: 'PD3 Vault Cracker',
Expand Down Expand Up @@ -45,5 +48,4 @@ export default defineConfig({
}),
],
base: '/pd3-vault-cracker/',
publicDir: 'public',
});

0 comments on commit fd49adb

Please sign in to comment.