webstudio 0.0.0-021f2d4 → 0.0.0-213310e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -7
- package/lib/cli.js +20 -33
- package/package.json +16 -17
- package/templates/defaults/package.json +7 -7
- package/templates/react-router/package.json +10 -12
- package/templates/react-router-docker/package.json +5 -1
- package/templates/react-router-netlify/app/constants.mjs +1 -1
- package/templates/react-router-netlify/package.json +3 -2
- package/templates/{netlify-edge-functions → react-router-vercel}/app/constants.mjs +2 -6
- package/templates/react-router-vercel/package.json +10 -0
- package/templates/react-router-vercel/react-router.config.ts +6 -0
- package/templates/react-router-vercel/vercel.json +12 -0
- package/templates/ssg/package.json +6 -6
- package/templates/netlify-edge-functions/app/entry.server.tsx +0 -21
- package/templates/netlify-edge-functions/netlify.toml +0 -16
- package/templates/netlify-edge-functions/package.json +0 -9
- package/templates/netlify-edge-functions/vite.config.ts +0 -18
- package/templates/netlify-functions/app/constants.mjs +0 -29
- package/templates/netlify-functions/app/entry.server.tsx +0 -1
- package/templates/netlify-functions/netlify.toml +0 -16
- package/templates/netlify-functions/package.json +0 -9
- package/templates/netlify-functions/vite.config.ts +0 -18
package/README.md
CHANGED
|
@@ -129,13 +129,7 @@ You can configure the project to support netlify serverless/edge-functions respe
|
|
|
129
129
|
You can manually change it using the `build` command. For serverless functions:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
webstudio build --template netlify
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
and for edge functions:
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
webstudio build --template netlify-edge-functions
|
|
132
|
+
webstudio build --template netlify
|
|
139
133
|
```
|
|
140
134
|
|
|
141
135
|
## Important Notes
|
package/lib/cli.js
CHANGED
|
@@ -84,6 +84,11 @@ const PROJECT_TEMPLATES = [
|
|
|
84
84
|
{
|
|
85
85
|
value: "vercel",
|
|
86
86
|
label: "Vercel",
|
|
87
|
+
expand: ["react-router", "react-router-vercel"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: "vercel-legacy",
|
|
91
|
+
label: "Vercel (legacy)",
|
|
87
92
|
expand: ["defaults", "vercel"]
|
|
88
93
|
},
|
|
89
94
|
{
|
|
@@ -91,16 +96,6 @@ const PROJECT_TEMPLATES = [
|
|
|
91
96
|
label: "Netlify",
|
|
92
97
|
expand: ["react-router", "react-router-netlify"]
|
|
93
98
|
},
|
|
94
|
-
{
|
|
95
|
-
value: "netlify-functions",
|
|
96
|
-
label: "Netlify Functions",
|
|
97
|
-
expand: ["defaults", "netlify-functions"]
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
value: "netlify-edge-functions",
|
|
101
|
-
label: "Netlify Edge Functions",
|
|
102
|
-
expand: ["defaults", "netlify-edge-functions"]
|
|
103
|
-
},
|
|
104
99
|
{
|
|
105
100
|
value: "ssg",
|
|
106
101
|
label: "Static Site Generation (SSG)"
|
|
@@ -746,19 +741,13 @@ const prefixStyles = (styleMap) => {
|
|
|
746
741
|
if (property === "backdrop-filter") {
|
|
747
742
|
newStyleMap.set("-webkit-backdrop-filter", value);
|
|
748
743
|
}
|
|
744
|
+
if (property === "view-timeline-name" || property === "scroll-timeline-name") {
|
|
745
|
+
newStyleMap.set(`--${property}`, value);
|
|
746
|
+
}
|
|
749
747
|
newStyleMap.set(property, value);
|
|
750
748
|
}
|
|
751
749
|
return newStyleMap;
|
|
752
750
|
};
|
|
753
|
-
const captureError = (error, value) => {
|
|
754
|
-
if (process.env.NODE_ENV === "development") {
|
|
755
|
-
throw error;
|
|
756
|
-
}
|
|
757
|
-
setTimeout(() => {
|
|
758
|
-
throw error;
|
|
759
|
-
});
|
|
760
|
-
return value;
|
|
761
|
-
};
|
|
762
751
|
const fallbackTransform = (styleValue) => {
|
|
763
752
|
var _a;
|
|
764
753
|
if (styleValue.type !== "fontFamily") {
|
|
@@ -850,7 +839,7 @@ const toValue = (styleValue, transformValue) => {
|
|
|
850
839
|
if (value.type === "guaranteedInvalid") {
|
|
851
840
|
return "";
|
|
852
841
|
}
|
|
853
|
-
return
|
|
842
|
+
return "";
|
|
854
843
|
};
|
|
855
844
|
const Unit = z.string();
|
|
856
845
|
const UnitValue = z.object({
|
|
@@ -3451,7 +3440,7 @@ ${prop.name}={${propValue}}`;
|
|
|
3451
3440
|
return "";
|
|
3452
3441
|
}
|
|
3453
3442
|
const indexVariable = scope.getName(`${instance.id}-index`, "index");
|
|
3454
|
-
generatedElement += `{${collectionDataValue}?.map((${collectionItemValue}: any, ${indexVariable}: number) =>
|
|
3443
|
+
generatedElement += `{${collectionDataValue}?.map?.((${collectionItemValue}: any, ${indexVariable}: number) =>
|
|
3455
3444
|
`;
|
|
3456
3445
|
generatedElement += `<Fragment key={${indexVariable}}>
|
|
3457
3446
|
`;
|
|
@@ -4611,7 +4600,7 @@ const meta$4 = {
|
|
|
4611
4600
|
const meta$3 = {
|
|
4612
4601
|
category: "hidden",
|
|
4613
4602
|
icon: ResourceIcon,
|
|
4614
|
-
type: "
|
|
4603
|
+
type: "embed",
|
|
4615
4604
|
constraints: {
|
|
4616
4605
|
relation: "parent",
|
|
4617
4606
|
component: { $eq: "HeadSlot" }
|
|
@@ -4620,7 +4609,7 @@ const meta$3 = {
|
|
|
4620
4609
|
const meta$2 = {
|
|
4621
4610
|
category: "hidden",
|
|
4622
4611
|
icon: WindowInfoIcon,
|
|
4623
|
-
type: "
|
|
4612
|
+
type: "embed",
|
|
4624
4613
|
constraints: {
|
|
4625
4614
|
relation: "parent",
|
|
4626
4615
|
component: { $eq: "HeadSlot" }
|
|
@@ -6417,8 +6406,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6417
6406
|
switch (deployTarget) {
|
|
6418
6407
|
case "vercel":
|
|
6419
6408
|
return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
|
|
6420
|
-
case "netlify
|
|
6421
|
-
case "netlify-edge-functions":
|
|
6409
|
+
case "netlify":
|
|
6422
6410
|
return [
|
|
6423
6411
|
`To deploy to Netlify, run the following commands: `,
|
|
6424
6412
|
`Run ${pc.dim("npx netlify-cli login")} to login to Netlify.`,
|
|
@@ -6431,7 +6419,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6431
6419
|
}
|
|
6432
6420
|
};
|
|
6433
6421
|
const name = "webstudio";
|
|
6434
|
-
const version = "0.0.0-
|
|
6422
|
+
const version = "0.0.0-213310e";
|
|
6435
6423
|
const description = "Webstudio CLI";
|
|
6436
6424
|
const author = "Webstudio <github@webstudio.is>";
|
|
6437
6425
|
const homepage = "https://webstudio.is";
|
|
@@ -6462,7 +6450,7 @@ const engines = {
|
|
|
6462
6450
|
node: ">=20.12"
|
|
6463
6451
|
};
|
|
6464
6452
|
const dependencies = {
|
|
6465
|
-
"@clack/prompts": "^0.
|
|
6453
|
+
"@clack/prompts": "^0.10.0",
|
|
6466
6454
|
"@emotion/hash": "^0.9.2",
|
|
6467
6455
|
acorn: "^8.14.0",
|
|
6468
6456
|
"acorn-walk": "^8.3.4",
|
|
@@ -6479,11 +6467,9 @@ const dependencies = {
|
|
|
6479
6467
|
zod: "^3.22.4"
|
|
6480
6468
|
};
|
|
6481
6469
|
const devDependencies = {
|
|
6482
|
-
"@netlify/remix-adapter": "^2.5.1",
|
|
6483
|
-
"@netlify/remix-edge-adapter": "3.4.2",
|
|
6484
6470
|
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
6485
|
-
"@react-router/dev": "^7.1.
|
|
6486
|
-
"@react-router/fs-routes": "^7.1.
|
|
6471
|
+
"@react-router/dev": "^7.1.5",
|
|
6472
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
6487
6473
|
"@remix-run/cloudflare": "^2.15.2",
|
|
6488
6474
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
6489
6475
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -6493,6 +6479,7 @@ const devDependencies = {
|
|
|
6493
6479
|
"@types/react": "^18.2.70",
|
|
6494
6480
|
"@types/react-dom": "^18.2.25",
|
|
6495
6481
|
"@types/yargs": "^17.0.33",
|
|
6482
|
+
"@vercel/react-router": "^1.0.2",
|
|
6496
6483
|
"@vitejs/plugin-react": "^4.3.4",
|
|
6497
6484
|
"@webstudio-is/http-client": "workspace:*",
|
|
6498
6485
|
"@webstudio-is/image": "workspace:*",
|
|
@@ -6509,11 +6496,11 @@ const devDependencies = {
|
|
|
6509
6496
|
prettier: "3.4.2",
|
|
6510
6497
|
react: "18.3.0-canary-14898b6a9-20240318",
|
|
6511
6498
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
6512
|
-
"react-router": "^7.1.
|
|
6499
|
+
"react-router": "^7.1.5",
|
|
6513
6500
|
"ts-expect": "^1.3.0",
|
|
6514
6501
|
vike: "^0.4.220",
|
|
6515
6502
|
vite: "^5.4.11",
|
|
6516
|
-
vitest: "^3.0.
|
|
6503
|
+
vitest: "^3.0.4",
|
|
6517
6504
|
wrangler: "^3.63.2"
|
|
6518
6505
|
};
|
|
6519
6506
|
const packageJson = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-213310e",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=20.12"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@clack/prompts": "^0.
|
|
29
|
+
"@clack/prompts": "^0.10.0",
|
|
30
30
|
"@emotion/hash": "^0.9.2",
|
|
31
31
|
"acorn": "^8.14.0",
|
|
32
32
|
"acorn-walk": "^8.3.4",
|
|
@@ -43,11 +43,9 @@
|
|
|
43
43
|
"zod": "^3.22.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@netlify/remix-adapter": "^2.5.1",
|
|
47
|
-
"@netlify/remix-edge-adapter": "3.4.2",
|
|
48
46
|
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
49
|
-
"@react-router/dev": "^7.1.
|
|
50
|
-
"@react-router/fs-routes": "^7.1.
|
|
47
|
+
"@react-router/dev": "^7.1.5",
|
|
48
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
51
49
|
"@remix-run/cloudflare": "^2.15.2",
|
|
52
50
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
53
51
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -57,27 +55,28 @@
|
|
|
57
55
|
"@types/react": "^18.2.70",
|
|
58
56
|
"@types/react-dom": "^18.2.25",
|
|
59
57
|
"@types/yargs": "^17.0.33",
|
|
58
|
+
"@vercel/react-router": "^1.0.2",
|
|
60
59
|
"@vitejs/plugin-react": "^4.3.4",
|
|
61
60
|
"h3": "^1.14.0",
|
|
62
61
|
"ipx": "^3.0.1",
|
|
63
62
|
"prettier": "3.4.2",
|
|
64
63
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
65
64
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
66
|
-
"react-router": "^7.1.
|
|
65
|
+
"react-router": "^7.1.5",
|
|
67
66
|
"ts-expect": "^1.3.0",
|
|
68
67
|
"vike": "^0.4.220",
|
|
69
68
|
"vite": "^5.4.11",
|
|
70
|
-
"vitest": "^3.0.
|
|
69
|
+
"vitest": "^3.0.4",
|
|
71
70
|
"wrangler": "^3.63.2",
|
|
72
|
-
"@webstudio-is/http-client": "0.0.0-
|
|
73
|
-
"@webstudio-is/image": "0.0.0-
|
|
74
|
-
"@webstudio-is/react-sdk": "0.0.0-
|
|
75
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
76
|
-
"@webstudio-is/sdk
|
|
77
|
-
"@webstudio-is/sdk-components-react": "0.0.0-
|
|
78
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-
|
|
79
|
-
"@webstudio-is/sdk-components-react-remix": "0.0.0-
|
|
80
|
-
"@webstudio-is/sdk-components-react-router": "0.0.0-
|
|
71
|
+
"@webstudio-is/http-client": "0.0.0-213310e",
|
|
72
|
+
"@webstudio-is/image": "0.0.0-213310e",
|
|
73
|
+
"@webstudio-is/react-sdk": "0.0.0-213310e",
|
|
74
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-213310e",
|
|
75
|
+
"@webstudio-is/sdk": "0.0.0-213310e",
|
|
76
|
+
"@webstudio-is/sdk-components-react": "0.0.0-213310e",
|
|
77
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-213310e",
|
|
78
|
+
"@webstudio-is/sdk-components-react-remix": "0.0.0-213310e",
|
|
79
|
+
"@webstudio-is/sdk-components-react-router": "0.0.0-213310e",
|
|
81
80
|
"@webstudio-is/tsconfig": "1.0.7"
|
|
82
81
|
},
|
|
83
82
|
"scripts": {
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"@remix-run/node": "2.15.2",
|
|
12
12
|
"@remix-run/react": "2.15.2",
|
|
13
13
|
"@remix-run/server-runtime": "2.15.2",
|
|
14
|
-
"@webstudio-is/image": "0.0.0-
|
|
15
|
-
"@webstudio-is/react-sdk": "0.0.0-
|
|
16
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.0.0-
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-
|
|
20
|
-
"@webstudio-is/sdk-components-react-remix": "0.0.0-
|
|
14
|
+
"@webstudio-is/image": "0.0.0-213310e",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.0.0-213310e",
|
|
16
|
+
"@webstudio-is/sdk": "0.0.0-213310e",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.0.0-213310e",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-213310e",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-213310e",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.0.0-213310e",
|
|
21
21
|
"isbot": "^5.1.22",
|
|
22
22
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
23
23
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
@@ -5,24 +5,22 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "react-router build",
|
|
7
7
|
"dev": "react-router dev",
|
|
8
|
-
"start": "react-router-serve ./build/server/index.js",
|
|
9
8
|
"typecheck": "tsc"
|
|
10
9
|
},
|
|
11
10
|
"dependencies": {
|
|
12
|
-
"@react-router/dev": "^7.1.
|
|
13
|
-
"@react-router/fs-routes": "^7.1.
|
|
14
|
-
"@
|
|
15
|
-
"@webstudio-is/
|
|
16
|
-
"@webstudio-is/
|
|
17
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
18
|
-
"@webstudio-is/sdk-components-
|
|
19
|
-
"@webstudio-is/sdk-components-react-
|
|
20
|
-
"@webstudio-is/sdk-components-react
|
|
21
|
-
"@webstudio-is/sdk-components-react": "0.0.0-021f2d4",
|
|
11
|
+
"@react-router/dev": "^7.1.5",
|
|
12
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
13
|
+
"@webstudio-is/image": "0.0.0-213310e",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.0.0-213310e",
|
|
15
|
+
"@webstudio-is/sdk": "0.0.0-213310e",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-213310e",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-213310e",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.0.0-213310e",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.0.0-213310e",
|
|
22
20
|
"isbot": "^5.1.22",
|
|
23
21
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
24
22
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
25
|
-
"react-router": "^7.1.
|
|
23
|
+
"react-router": "^7.1.5",
|
|
26
24
|
"vite": "^5.4.11"
|
|
27
25
|
},
|
|
28
26
|
"devDependencies": {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"start": "npx netlify-cli serve"
|
|
3
|
+
"start": "npx netlify-cli serve",
|
|
4
|
+
"deploy": "npx netlify-cli deploy --build --prod"
|
|
4
5
|
},
|
|
5
6
|
"dependencies": {
|
|
6
7
|
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
7
|
-
"@react-router/node": "^7.1.
|
|
8
|
+
"@react-router/node": "^7.1.5"
|
|
8
9
|
}
|
|
9
10
|
}
|
|
@@ -16,14 +16,10 @@ export const imageLoader = (props) => {
|
|
|
16
16
|
return props.src;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
// https://
|
|
19
|
+
// https://vercel.com/blog/build-your-own-web-framework#automatic-image-optimization
|
|
20
20
|
const searchParams = new URLSearchParams();
|
|
21
21
|
searchParams.set("url", props.src);
|
|
22
22
|
searchParams.set("w", props.width.toString());
|
|
23
|
-
if (props.height) {
|
|
24
|
-
searchParams.set("h", props.height.toString());
|
|
25
|
-
}
|
|
26
23
|
searchParams.set("q", props.quality.toString());
|
|
27
|
-
|
|
28
|
-
return `/.netlify/images?${searchParams}`;
|
|
24
|
+
return `/_vercel/image?${searchParams}`;
|
|
29
25
|
};
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@webstudio-is/image": "0.0.0-
|
|
12
|
-
"@webstudio-is/react-sdk": "0.0.0-
|
|
13
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
14
|
-
"@webstudio-is/sdk-components-react": "0.0.0-
|
|
15
|
-
"@webstudio-is/sdk-components-animation": "0.0.0-
|
|
16
|
-
"@webstudio-is/sdk-components-react-radix": "0.0.0-
|
|
11
|
+
"@webstudio-is/image": "0.0.0-213310e",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.0.0-213310e",
|
|
13
|
+
"@webstudio-is/sdk": "0.0.0-213310e",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.0.0-213310e",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.0.0-213310e",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.0.0-213310e",
|
|
17
17
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
18
18
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
19
19
|
"vike": "^0.4.220"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { EntryContext } from "@remix-run/node";
|
|
2
|
-
import { RemixServer } from "@remix-run/react";
|
|
3
|
-
import { renderToString } from "react-dom/server";
|
|
4
|
-
|
|
5
|
-
export default function handleRequest(
|
|
6
|
-
request: Request,
|
|
7
|
-
responseStatusCode: number,
|
|
8
|
-
responseHeaders: Headers,
|
|
9
|
-
remixContext: EntryContext
|
|
10
|
-
) {
|
|
11
|
-
const markup = renderToString(
|
|
12
|
-
<RemixServer context={remixContext} url={request.url} />
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
responseHeaders.set("Content-Type", "text/html");
|
|
16
|
-
|
|
17
|
-
return new Response("<!DOCTYPE html>" + markup, {
|
|
18
|
-
headers: responseHeaders,
|
|
19
|
-
status: responseStatusCode,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[build]
|
|
2
|
-
command = "npm run build"
|
|
3
|
-
publish = "build/client"
|
|
4
|
-
|
|
5
|
-
[dev]
|
|
6
|
-
command = "npm run dev"
|
|
7
|
-
framework = "vite"
|
|
8
|
-
|
|
9
|
-
# Set immutable caching for static files, because they have fingerprinted filenames
|
|
10
|
-
|
|
11
|
-
[[headers]]
|
|
12
|
-
for = "/build/*"
|
|
13
|
-
|
|
14
|
-
[headers.values]
|
|
15
|
-
|
|
16
|
-
"Cache-Control" = "public, max-age=31560000, immutable"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vitePlugin as remix } from "@remix-run/dev";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import { netlifyPlugin } from "@netlify/remix-edge-adapter/plugin";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
remix({
|
|
8
|
-
future: {
|
|
9
|
-
v3_lazyRouteDiscovery: false,
|
|
10
|
-
v3_relativeSplatPath: false,
|
|
11
|
-
v3_singleFetch: false,
|
|
12
|
-
v3_fetcherPersist: false,
|
|
13
|
-
v3_throwAbortReason: false,
|
|
14
|
-
},
|
|
15
|
-
}),
|
|
16
|
-
netlifyPlugin(),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* We use mjs extension as constants in this file is shared with the build script
|
|
3
|
-
* and we use `node --eval` to extract the constants.
|
|
4
|
-
*/
|
|
5
|
-
export const assetBaseUrl = "/assets/";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @type {import("@webstudio-is/image").ImageLoader}
|
|
9
|
-
*/
|
|
10
|
-
export const imageLoader = (props) => {
|
|
11
|
-
if (process.env.NODE_ENV !== "production") {
|
|
12
|
-
return props.src;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (props.format === "raw") {
|
|
16
|
-
return props.src;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// https://docs.netlify.com/image-cdn/overview/
|
|
20
|
-
const searchParams = new URLSearchParams();
|
|
21
|
-
searchParams.set("url", props.src);
|
|
22
|
-
searchParams.set("w", props.width.toString());
|
|
23
|
-
if (props.height) {
|
|
24
|
-
searchParams.set("h", props.height.toString());
|
|
25
|
-
}
|
|
26
|
-
searchParams.set("q", props.quality.toString());
|
|
27
|
-
// fit=contain by default
|
|
28
|
-
return `/.netlify/images?${searchParams}`;
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { handleRequest as default } from "@netlify/remix-adapter";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[build]
|
|
2
|
-
command = "npm run build"
|
|
3
|
-
publish = "build/client"
|
|
4
|
-
|
|
5
|
-
[dev]
|
|
6
|
-
command = "npm run dev"
|
|
7
|
-
framework = "vite"
|
|
8
|
-
|
|
9
|
-
# Set immutable caching for static files, because they have fingerprinted filenames
|
|
10
|
-
|
|
11
|
-
[[headers]]
|
|
12
|
-
for = "/build/*"
|
|
13
|
-
|
|
14
|
-
[headers.values]
|
|
15
|
-
|
|
16
|
-
"Cache-Control" = "public, max-age=31560000, immutable"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vitePlugin as remix } from "@remix-run/dev";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import { netlifyPlugin } from "@netlify/remix-adapter/plugin";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
remix({
|
|
8
|
-
future: {
|
|
9
|
-
v3_lazyRouteDiscovery: false,
|
|
10
|
-
v3_relativeSplatPath: false,
|
|
11
|
-
v3_singleFetch: false,
|
|
12
|
-
v3_fetcherPersist: false,
|
|
13
|
-
v3_throwAbortReason: false,
|
|
14
|
-
},
|
|
15
|
-
}),
|
|
16
|
-
netlifyPlugin(),
|
|
17
|
-
],
|
|
18
|
-
});
|