Skip to content

Commit af4fd7f

Browse files
committed
Fixes
1 parent 8d4b35e commit af4fd7f

File tree

3 files changed

+86
-63
lines changed

3 files changed

+86
-63
lines changed

Build/pwa-assets.config.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { defineConfig, minimal2023Preset } from '@vite-pwa/assets-generator/config'
2+
3+
export default defineConfig({
4+
preset: {
5+
...minimal2023Preset,
6+
apple: {
7+
...minimal2023Preset.apple,
8+
resizeOptions: {
9+
fit: 'cover',
10+
background: 'transparent'
11+
},
12+
padding: 0
13+
},
14+
maskable: {
15+
...minimal2023Preset.maskable,
16+
resizeOptions: {
17+
fit: 'cover',
18+
background: 'transparent'
19+
},
20+
padding: 0
21+
}
22+
},
23+
images: 'public/icon-maskable.png'
24+
})

Build/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"types": [
2424
"vite",
2525
"vite/client",
26-
"node"
26+
"node",
27+
"node_modules/@vitejs/plugin-react/dist/index.d.ts"
2728
]
2829
},
2930
"include": [

Build/vite.config.ts

Lines changed: 60 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -75,63 +75,61 @@ if (isWeb) {
7575
],
7676
icons: [
7777
{
78-
src: "public/icon-any.png",
78+
src: "icon-any.png",
7979
sizes: "1024x1024",
8080
type: "image/png",
8181
purpose: "any",
8282
},
8383
{
84-
src: "public/icon-maskable.png",
84+
src: "icon-maskable.png",
8585
sizes: "1280x1280",
8686
type: "image/png",
8787
purpose: "maskable",
8888
},
8989
],
9090
launch_type: "single-client",
91+
screenshots: [
92+
{
93+
src: "./screenshots/MainUI.png",
94+
sizes: "1854x926",
95+
type: "image/png",
96+
label: "Main Player UI",
97+
},
98+
{
99+
src: "./screenshots/CustomizedUI.png",
100+
sizes: "1854x926",
101+
type: "image/png",
102+
label: "Customized with the Nebula theme and Phosphor icons",
103+
},
104+
{
105+
src: "./screenshots/LyricsandVisualizer.png",
106+
sizes: "1854x926",
107+
type: "image/png",
108+
label: "Lyrics and Visualizer View",
109+
},
110+
{
111+
src: "./screenshots/MainUI-Mobile.png",
112+
sizes: "624x927",
113+
type: "image/png",
114+
label: "Main Player UI on Mobile",
115+
},
116+
{
117+
src: "./screenshots/CustomizedUI-Mobile.png",
118+
sizes: "624x927",
119+
type: "image/png",
120+
label:
121+
"Customized with the Nebula theme and Phosphor icons on Mobile",
122+
},
123+
{
124+
src: "./screenshots/LyricsandVisualizer-Mobile.png",
125+
sizes: "624x927",
126+
type: "image/png",
127+
label: "Lyrics and Visualizer View on Mobile",
128+
},
129+
],
91130
},
92-
screenshots: [
93-
{
94-
src: "./screenshots/MainUI.png",
95-
sizes: "1854x926",
96-
type: "image/png",
97-
label: "Main Player UI",
98-
},
99-
{
100-
src: "./screenshots/CustomizedUI.png",
101-
sizes: "1854x926",
102-
type: "image/png",
103-
label: "Customized with the Nebula theme and Phosphor icons",
104-
},
105-
{
106-
src: "./screenshots/LyricsandVisualizer.png",
107-
sizes: "1854x926",
108-
type: "image/png",
109-
label: "Lyrics and Visualizer View",
110-
},
111-
{
112-
src: "./screenshots/MainUI-Mobile.png",
113-
sizes: "624x927",
114-
type: "image/png",
115-
label: "Main Player UI on Mobile",
116-
},
117-
{
118-
src: "./screenshots/CustomizedUI-Mobile.png",
119-
sizes: "624x927",
120-
type: "image/png",
121-
label:
122-
"Customized with the Nebula theme and Phosphor icons on Mobile",
123-
},
124-
{
125-
src: "./screenshots/LyricsandVisualizer-Mobile.png",
126-
sizes: "624x927",
127-
type: "image/png",
128-
label: "Lyrics and Visualizer View on Mobile",
129-
},
130-
],
131131
pwaAssets: {
132-
image: "public/icon-any.png",
133-
preset: "minimal-2023",
134-
includeHtmlHeadLinks: true,
132+
config:true,
135133
},
136134
workbox: {
137135
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5 MB
@@ -174,25 +172,25 @@ export default defineConfig({
174172
// Platform-specific server config
175173
server: isDesktop
176174
? {
177-
port: 1420,
178-
strictPort: true,
179-
host: host || false,
180-
hmr: host
181-
? {
182-
protocol: "ws",
183-
host,
184-
port: 1421,
185-
}
186-
: undefined,
187-
watch: {
188-
// Tell vite to ignore watching `src-tauri`
189-
ignored: ["**/src-tauri/**"],
190-
},
191-
}
192-
: {
193-
open: true,
194-
allowedHosts: true,
175+
port: 1420,
176+
strictPort: true,
177+
host: host || false,
178+
hmr: host
179+
? {
180+
protocol: "ws",
181+
host,
182+
port: 1421,
183+
}
184+
: undefined,
185+
watch: {
186+
// Tell vite to ignore watching `src-tauri`
187+
ignored: ["**/src-tauri/**"],
195188
},
189+
}
190+
: {
191+
open: true,
192+
allowedHosts: true,
193+
},
196194

197195
// Prevent vite from obscuring rust errors (desktop only)
198196
clearScreen: isDesktop ? false : undefined,

0 commit comments

Comments
 (0)