Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbenton committed Apr 3, 2024
1 parent 9facbfa commit 8009adf
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<meta property="og:image:height" content="630" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:image" content="%VITE_OPENGRAPH_PATH%" />
<meta name="description" content="My Awesome App description">
<link rel="icon" href="%VITE_FAVICON_PATH%">
<link rel="apple-touch-icon" href="%VITE_FAVICON_PATH%" sizes="180x180">
<link rel="mask-icon" href="%VITE_FAVICON_PATH%" color="#FFFFFF">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div id="root"></div>
Expand Down
30 changes: 26 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
import { defineConfig } from "vite";
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
import tsConfigPaths from "vite-tsconfig-paths";
import {VitePWA} from "vite-plugin-pwa"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), svgr(), tsConfigPaths(), VitePWA({registerType:"autoUpdate"})],
export default ({mode}) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())};

return defineConfig({
plugins: [react(), svgr(), tsConfigPaths(), VitePWA({registerType:"autoUpdate", includeAssets: [process.env.VITE_FAVICON_PATH],
manifest: {
name: process.env.VITE_TITLE,
short_name: process.env.VITE_TITLE,
description: 'My Awesome App description',
theme_color: '#ffffff',
icons: [
{
src: process.env.VITE_FAVICON_PATH,
sizes: '192x192',
type: 'image/svg'
},
{
src: process.env.VITE_FAVICON_PATH,
sizes: '512x512',
type: 'image/svg'
}
]
}})],
optimizeDeps: {
// exclude: [
// "firebase",
Expand All @@ -15,4 +36,5 @@ export default defineConfig({
// "firebase/analytics",
// ],
},
});
})
};

0 comments on commit 8009adf

Please sign in to comment.