Skip to content

Commit

Permalink
build: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gander committed Jan 26, 2024
1 parent 75ca624 commit bcdebe9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 29 deletions.
Binary file modified bun.lockb
Binary file not shown.
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
44 changes: 25 additions & 19 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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),
],
};
});

0 comments on commit bcdebe9

Please sign in to comment.