|
|
@ -5,10 +5,9 @@ import vue from '@vitejs/plugin-vue'
|
|
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
|
|
|
|
|
|
|
|
function setupPlugins(env: ImportMetaEnv): PluginOption[] {
|
|
|
|
function setupPlugins(env: ImportMetaEnv): PluginOption[] {
|
|
|
|
const plugins = [vue()]
|
|
|
|
return [
|
|
|
|
|
|
|
|
vue(),
|
|
|
|
if (env.VITE_GLOB_APP_PWA === 'true') {
|
|
|
|
env.VITE_GLOB_APP_PWA === 'true' && VitePWA({
|
|
|
|
VitePWA({
|
|
|
|
|
|
|
|
injectRegister: 'auto',
|
|
|
|
injectRegister: 'auto',
|
|
|
|
manifest: {
|
|
|
|
manifest: {
|
|
|
|
name: 'chatGPT',
|
|
|
|
name: 'chatGPT',
|
|
|
@ -18,9 +17,8 @@ function setupPlugins(env: ImportMetaEnv): PluginOption[] {
|
|
|
|
{ src: 'pwa-512x512.png', sizes: '512x512', type: 'image/png' },
|
|
|
|
{ src: 'pwa-512x512.png', sizes: '512x512', type: 'image/png' },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
]
|
|
|
|
return plugins
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default defineConfig((env) => {
|
|
|
|
export default defineConfig((env) => {
|
|
|
|