Skip to content

Commit

Permalink
chore: update PWA configuration + hash history
Browse files Browse the repository at this point in the history
  • Loading branch information
kaandesu committed Apr 23, 2023
1 parent 5968325 commit e42ba5b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="description" content="Vue3 Template">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="mask-icon" href="/favicon-dark.svg" color="#FFFFFF">
<meta name="theme-color" content="#ffffff">
<title>Vite App</title>
</head>
<body>
Expand Down
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
4 changes: 2 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
Expand Down
8 changes: 4 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export default defineConfig(({ mode }) => {
}),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.svg', 'safari-pinned-tab.svg'],
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'favicon-dark.svg'],
manifest: {
name: 'kaandesu/vite-template',
short_name: 'kaandesu/vite-template',
name: 'vite-template',
short_name: 'vite-template',
theme_color: '#ffffff',
icons: [
{
Expand All @@ -53,7 +53,7 @@ export default defineConfig(({ mode }) => {
},
workbox: {
navigateFallback: '/',
cleanupOutdatedCaches: false
cleanupOutdatedCaches: true
},
// client: {
// installPrompt: true,
Expand Down

0 comments on commit e42ba5b

Please sign in to comment.