Skip to content

Commit bfb63d1

Browse files
committed
docs: fix landing build by pinning NODE_ENV and bumping @swc/core
Docusaurus + React 19.2 SSR was failing with `dispatcher.getOwner is not a function` because React's dev build was loading before NODE_ENV got set, mismatching the production react-dom-server. Setting NODE_ENV=production directly on the build script keeps both halves on the same build. Also override @swc/core to ^1.15.30 so the SWC JS minifier accepts the `extractComments` field passed by terser-webpack- plugin. Tweak adapter-swap header icon placement while here. Made-with: Cursor
1 parent c7786ed commit bfb63d1

4 files changed

Lines changed: 498 additions & 476 deletions

File tree

documentation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"docusaurus": "docusaurus",
77
"start": "docusaurus clear && docusaurus start",
8-
"build": "docusaurus clear && docusaurus build",
8+
"build": "NODE_ENV=production docusaurus clear && NODE_ENV=production docusaurus build",
99
"swizzle": "docusaurus swizzle",
1010
"deploy": "docusaurus deploy",
1111
"clear": "docusaurus clear",

documentation/src/components/landing/features/animations/adapter-swap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { cn } from "@site/src/lib/utils";
12
import FirebaseIcon from "@site/static/img/integration-firebase.svg";
23
import GraphqlIcon from "@site/static/img/integration-graphql.svg";
34
import RestIcon from "@site/static/img/integration-rest.svg";
45
import SocketsIcon from "@site/static/img/integration-sockets.svg";
5-
import { cn } from "@site/src/lib/utils";
66
import { ArrowDownToLine, Check, MonitorSmartphone } from "lucide-react";
77
import { AnimatePresence, motion, useInView } from "motion/react";
88
import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
@@ -292,8 +292,8 @@ export function AdapterSwapAnimation() {
292292
<div className="size-1.5 rounded-full bg-zinc-700" />
293293
<div className="size-1.5 rounded-full bg-zinc-700" />
294294
</div>
295-
<MonitorSmartphone className="ml-0.5 size-4 text-zinc-400" />
296295
<span className="text-[12px] font-semibold text-zinc-100">Your app</span>
296+
<MonitorSmartphone className="ml-auto size-4 text-zinc-400" />
297297
</div>
298298
<div className="flex items-center gap-2 px-2.5 py-1.5">
299299
<Check className="size-4 shrink-0 text-emerald-400" />

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@
116116
"@hyper-fetch/axios": "workspace:*",
117117
"@hyper-fetch/graphql": "workspace:*",
118118
"@hyper-fetch/plugin-devtools": "workspace:*",
119-
"@hyper-fetch/testing": "workspace:*"
119+
"@hyper-fetch/testing": "workspace:*",
120+
"@swc/core": "^1.15.30"
120121
}
121122
},
122123
"keywords": [

0 commit comments

Comments
 (0)