-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
81 lines (80 loc) · 2.2 KB
/
vite.config.ts
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
import Pages from 'vite-plugin-pages'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), VitePWA({
base: '/',
includeAssets: ['favicon.svg', 'favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
devOptions: {
enabled: true
/* other options */
},
registerType: 'autoUpdate',
manifest: {
id: 'lpains.sharpcooking',
name: 'Sharp Cooking',
short_name: 'Sharp Cooking',
description: 'Your recipe book app',
theme_color: '#ffffff',
scope: '.',
icons: [
{
src: 'android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
}
],
shortcuts: [
{
name: "New Manual Recipe",
short_name: "New Manual Recipe",
description: "Create a new recipe manually",
url: "/#/recipe/0/edit?fromShortcut=1",
icons: [{ "src": "/shortcut-add-manual.png", "sizes": "192x192" }]
},
{
name: "Import From URL",
short_name: "New Recipe",
description: "Create a new recipe from a URL",
url: "/#/recipe/0/edit?import=1&fromShortcut=1",
icons: [{ "src": "/shortcut-add-url.png", "sizes": "192x192" }]
},
{
name: "Scan a Recipe",
short_name: "New Recipe",
description: "Create a new recipe by scanning from an image",
url: "/#/recipe/import-ocr?fromShortcut=1",
icons: [{ "src": "/shortcut-add-scan.png", "sizes": "192x192" }]
}
],
launch_handler: {
client_mode: "focus-existing"
},
orientation: "portrait-primary",
categories: ["food_and_drink"],
dir: "ltr",
}
}),
Pages({
extendRoute(route, parent) {
return {
...route,
meta: { title: "" },
}
},
})],
resolve: {
alias: {
'@/': `${path.resolve(__dirname, 'src')}/`,
'util': "./src/util.js"
}
}
})