create-vexcms 0.1.0-alpha.4 → 0.1.0-alpha.6
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
CHANGED
|
@@ -110,6 +110,10 @@ First run only — links or creates a Convex project and prints your real
|
|
|
110
110
|
replacing the generated placeholder values so the app stops pointing at
|
|
111
111
|
`https://placeholder.convex.cloud`. Leave `Ctrl-C` once it reports functions are ready.
|
|
112
112
|
|
|
113
|
+
`next.config.ts` derives `images.remotePatterns` from `NEXT_PUBLIC_CONVEX_URL`
|
|
114
|
+
automatically, so `next/image` picks up the real deployment's hostname without any
|
|
115
|
+
further edits.
|
|
116
|
+
|
|
113
117
|
### 2. Configure environment variables
|
|
114
118
|
|
|
115
119
|
The installer writes `.env.local` with a generated `BETTER_AUTH_SECRET`,
|
package/package.json
CHANGED
|
@@ -31,6 +31,10 @@ NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
|
|
|
31
31
|
NEXT_PUBLIC_CONVEX_SITE_URL=https://your-deployment.convex.site
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
`next.config.ts` reads `NEXT_PUBLIC_CONVEX_URL` at build/start time and adds that
|
|
35
|
+
deployment's hostname to `images.remotePatterns` automatically, so `next/image` can serve
|
|
36
|
+
uploaded media without a manual edit.
|
|
37
|
+
|
|
34
38
|
Better Auth runs inside your Convex deployment, not in the Next.js server —
|
|
35
39
|
it does **not** read `.env.local`. Set the same two values on the
|
|
36
40
|
deployment itself:
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import type { NextConfig } from "next"
|
|
2
2
|
|
|
3
|
-
import "./src/env.mjs"
|
|
3
|
+
import { env } from "./src/env.mjs"
|
|
4
|
+
|
|
5
|
+
// Convex file storage URLs (`next/image` sources for uploaded media) are
|
|
6
|
+
// served from `<deployment>.convex.cloud` — derive the hostname from the
|
|
7
|
+
// validated NEXT_PUBLIC_CONVEX_URL so scaffolds work without a manual
|
|
8
|
+
// next.config.ts edit. Falls back to an empty list when the URL is unset or
|
|
9
|
+
// unparsable (e.g. a deployment-less build with SKIP_ENV_VALIDATION set).
|
|
10
|
+
let convexImageRemotePatterns: NonNullable<NextConfig["images"]>["remotePatterns"] = []
|
|
11
|
+
try {
|
|
12
|
+
convexImageRemotePatterns = [{ hostname: new URL(env.NEXT_PUBLIC_CONVEX_URL).hostname }]
|
|
13
|
+
} catch {
|
|
14
|
+
// No deployment yet — leave remotePatterns empty.
|
|
15
|
+
}
|
|
4
16
|
|
|
5
17
|
const nextConfig: NextConfig = {
|
|
6
18
|
devIndicators: {
|
|
@@ -16,11 +28,9 @@ const nextConfig: NextConfig = {
|
|
|
16
28
|
root: import.meta.dirname,
|
|
17
29
|
},
|
|
18
30
|
images: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// e.g. { hostname: "your-deployment-575.convex.cloud" }.
|
|
23
|
-
],
|
|
31
|
+
// Additional remote image hosts (e.g. an external CMS or CDN) can be
|
|
32
|
+
// added here alongside the auto-derived Convex hostname above.
|
|
33
|
+
remotePatterns: convexImageRemotePatterns,
|
|
24
34
|
},
|
|
25
35
|
}
|
|
26
36
|
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@t3-oss/env-nextjs": "0.13.11",
|
|
25
25
|
"@tanstack/react-form": "1.33.1",
|
|
26
26
|
"@tanstack/react-query": "5.101.2",
|
|
27
|
-
"@vexcms/better-auth": "~0.1.0-alpha.
|
|
28
|
-
"@vexcms/core": "~0.1.0-alpha.
|
|
29
|
-
"@vexcms/file-storage-convex": "~0.1.0-alpha.
|
|
30
|
-
"@vexcms/next": "~0.1.0-alpha.
|
|
31
|
-
"@vexcms/react": "~0.1.0-alpha.
|
|
27
|
+
"@vexcms/better-auth": "~0.1.0-alpha.6",
|
|
28
|
+
"@vexcms/core": "~0.1.0-alpha.6",
|
|
29
|
+
"@vexcms/file-storage-convex": "~0.1.0-alpha.6",
|
|
30
|
+
"@vexcms/next": "~0.1.0-alpha.6",
|
|
31
|
+
"@vexcms/react": "~0.1.0-alpha.6",
|
|
32
32
|
"better-auth": "1.6.23",
|
|
33
33
|
"class-variance-authority": "0.7.1",
|
|
34
34
|
"clsx": "2.1.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/node": "20.19.43",
|
|
53
53
|
"@types/react": "19.2.17",
|
|
54
54
|
"@types/react-dom": "19.2.3",
|
|
55
|
-
"@vexcms/cli": "~0.1.0-alpha.
|
|
55
|
+
"@vexcms/cli": "~0.1.0-alpha.6",
|
|
56
56
|
"babel-plugin-react-compiler": "1.0.0",
|
|
57
57
|
"eslint": "9.39.5",
|
|
58
58
|
"eslint-config-next": "15.5.9",
|