-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
45 lines (43 loc) · 1.25 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const path = require('path')
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
import mkcert from 'vite-plugin-mkcert'
export default defineConfig({
assetsInclude: ['**/*.glb'],
base: './',
envDir: './env',
commonjsOptions: {
esmExternals: true,
},
optimizeDeps: {
include: ['@react-three/fiber']
},
plugins: [
mkcert(),
react(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,glb}']
},
manifest: {
name: 'Item FindAR',
short_name: 'FindAR',
description: 'An App for finding and identifying food products while shopping',
background_color: '#848484',
theme_color: '#1976d2',
orientation: 'portrait',
},
pwaAssets: {
overrideManifestIcons: true,
injectThemeColor: true,
image: path.resolve('src/assets/icon.png')
},
devOptions: {
enabled: true,
type: 'module',
},
})
]
})