-
Notifications
You must be signed in to change notification settings - Fork 417
Expand file tree
/
Copy pathvite.config.ts
More file actions
54 lines (53 loc) · 1.44 KB
/
vite.config.ts
File metadata and controls
54 lines (53 loc) · 1.44 KB
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
import { defineConfig } from "vite";
import { nitroV2Plugin } from "../../packages/start-nitro-v2-vite-plugin/src";
import { solidStart } from "../../packages/start/src/config";
export default defineConfig({
server: {
port: 3000,
},
plugins: [
solidStart({
image: {
local: {
sizes: [480, 600],
quality: 80,
publicPath: "public",
},
remote: {
transformURL(url) {
return {
src: {
source: `https://picsum.photos/seed/${url}/1200/900.webp`,
width: 1080,
height: 760,
},
variants: [
{
path: `https://picsum.photos/seed/${url}/800/600.jpg`,
width: 800,
type: "image/jpeg",
},
{
path: `https://picsum.photos/seed/${url}/400/300.jpg`,
width: 400,
type: "image/jpeg",
},
{
path: `https://picsum.photos/seed/${url}/800/600.png`,
width: 800,
type: "image/png",
},
{
path: `https://picsum.photos/seed/${url}/400/300.png`,
width: 400,
type: "image/png",
},
],
};
},
},
},
}),
nitroV2Plugin(),
],
});