Skip to content

Commit

Permalink
feat: init pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnovd committed Oct 11, 2021
1 parent d7ec7c1 commit ec03423
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 39 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
<meta name="application-name" content="Heroes 3 tools" />
<meta
name="keywords"
content="heroes 3 damage calculator, damage calculator heroes 3, heroes3tools, heroes 3 tools, heroes 3 hota, heroes 3, homm 3"
content="heroes 3 damage calculator, heroes 3 tools, heroes 3 hota, heroes 3, homm 3"
/>
<meta
name="description"
content="Web tools for simplification playing in Heroes of Might and Magic III: Horn of The Abyss"
/>
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="any" />
<link rel="apple-touch-icon" href="/apple.png" />
<link rel="apple-touch-icon" href="/favicon-apple.png" />
<meta name="theme-color" content="#ffffff">
<title>Vite App</title>
</head>
<body>
Expand Down
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { createApp } from 'vue'
import App from '@/App.vue'
import i18n from '@/i18n'
import router from '@/router'
import store from '@/store'
import '@/registerServiceWorker'
import { createApp } from 'vue'

createApp(App).use(i18n).use(router).use(store).mount('#app')
31 changes: 0 additions & 31 deletions src/registerServiceWorker.js

This file was deleted.

Empty file removed src/service-worker.js
Empty file.
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"ESNext",
"DOM",
"DOM.Iterable",
"ScriptHost"
"ScriptHost",
"WebWorker"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.spec.ts"
],
Expand Down
39 changes: 37 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
VitePWA({
mode: 'development',
includeAssets: [
'favicon.svg',
'favicon.ico',
'robots.txt',
'favicon-apple.png',
'favicon-192.png',
'favicon-512.png',
],
manifest: {
name: 'Heroes 3 tools',
short_name: 'heroes3tools',
description: 'Web tools for simplification playing in Heroes of Might and Magic III: Horn of The Abyss',
theme_color: '#ffffff',
icons: [
{
src: 'favicon-192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'favicon-512.png',
sizes: '512x512',
type: 'image/png',
},
],
},
workbox: {
sourcemap: true,
},
}),
],
resolve: {
alias: [
{
Expand Down

0 comments on commit ec03423

Please sign in to comment.