diff --git a/bun.lockb b/bun.lockb index 78ccb05..5a74fd7 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 65cd03e..8371f3e 100644 --- a/package.json +++ b/package.json @@ -20,18 +20,21 @@ }, "dependencies": { "bootstrap": "^5.3.2", - "vue": "^3.3.8" + "vue": "^3.4.15" }, "devDependencies": { - "@types/bootstrap": "^5.2.9", - "@types/node": "^20.9.1", - "@vitejs/plugin-vue": "^4.5.0", - "release-it": "^17.0.0", - "sass": "^1.69.5", - "typescript": "^5.2.2", - "vite": "^5.0.0", + "@tsconfig/node18": "^18.2.2", + "@types/bootstrap": "^5.2.10", + "@types/node": "^20.11.6", + "@vitejs/plugin-vue": "^5.0.3", + "@vue/tsconfig": "^0.5.1", + "npm-run-all2": "^6.1.1", + "release-it": "^17.0.3", + "sass": "^1.70.0", + "typescript": "~5.3.3", + "vite": "^5.0.12", "vite-plugin-html-config": "^1.0.11", - "vite-plugin-pwa": "^0.16.7", - "vue-tsc": "^1.8.22" + "vite-plugin-pwa": "^0.17.5", + "vue-tsc": "^1.8.27" } } diff --git a/vite.config.ts b/vite.config.ts index 5cd79f0..e52c394 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,13 +1,25 @@ import {defineConfig} from 'vite'; import vue from '@vitejs/plugin-vue'; -import htmlPlugin from 'vite-plugin-html-config'; +import HtmlPlugin, {ScriptTag} from 'vite-plugin-html-config'; import {VitePWA} from 'vite-plugin-pwa'; // https://vitejs.dev/config/ export default defineConfig(({command}) => { process.env.VITE_APP_VERSION = process.env.npm_package_version; - const plugins = [vue(), VitePWA({ + const headScripts: ScriptTag[] = []; + + if (command === 'build') { + if (process.env.VITE_UMAMI_ID && process.env.VITE_UMAMI_SRC) { + headScripts.push({ + 'async': true, + 'data-website-id': process.env.VITE_UMAMI_ID, + 'src': process.env.VITE_UMAMI_SRC, + }); + } + } + + const pwaOptions = { includeAssets: ['favicon-32x32.png', 'favicon-16x16.png', 'apple-touch-icon.png', 'robots.txt'], manifest: { id: 'dev.gander.nms-frigate-calc', @@ -38,24 +50,18 @@ export default defineConfig(({command}) => { type: 'image/png', purpose: 'maskable', }, - ] + ], }, devOptions: { - enabled: true - } - })]; - - if (command === 'build') { - if (process.env.VITE_UMAMI_ID && process.env.VITE_UMAMI_SRC) { - plugins.push(htmlPlugin({ - headScripts: [{ - 'async': true, - 'data-website-id': process.env.VITE_UMAMI_ID, - 'src': process.env.VITE_UMAMI_SRC, - }], - })); - } - } + enabled: true, + }, + }; - return {plugins}; + return { + plugins: [ + vue(), + HtmlPlugin({headScripts}), + VitePWA(pwaOptions), + ], + }; });