Skip to content

Commit

Permalink
Merge commit '91011c3e0651f9649f869c5495cf734d4c6236cb'
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarscher committed Jan 5, 2024
2 parents b21e000 + 91011c3 commit 2cd1123
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 12 deletions.
1 change: 0 additions & 1 deletion apps/next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const plugins = [
outputCSS: process.env.NODE_ENV === 'production' ? './public/tamagui.css' : null,
logTimings: true,
disableExtraction,
useReactNativeWebLite: true,
shouldExtract: (path) => {
if (path.includes(join('packages', 'app'))) {
return true
Expand Down
10 changes: 9 additions & 1 deletion apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
"private": true,
"scripts": {
"dev": "next dev",
"local-build": "TAMAGUI_TARGET=web bun x @cloudflare/next-on-pages --disable-worker-minification",
"local-serve": "bun x wrangler pages dev .vercel/output/static --port 3000 --compatibility-date 2023-10-30 --compatibility-flag=nodejs_compat",
"local": "bun run local-build && bun run local-serve",
"build": "next build",
"start": "next start",
"lint": "next lint",
"clean": "git clean -xdf .next node_modules .tamagui"
},
"dependencies": {
"@cloudflare/next-on-pages": "1.8.3",
"@ducanh2912/next-pwa": "^9.7.2",
"@supabase/auth-helpers-nextjs": "^0.7.4",
"@supabase/auth-helpers-react": "^0.4.2",
Expand All @@ -31,6 +35,10 @@
"devDependencies": {
"@tamagui/next-plugin": "1.75.9",
"@types/react": "^18.2.37",
"vercel": "32.5.3"
"eslint-plugin-next-on-pages": "1.8.3",
"eslint": "^8.56.0",
"eslint-config-next": "^14.0.4",
"vercel": "33.0.2",
"wrangler": "3.22.2"
}
}
10 changes: 9 additions & 1 deletion apps/next/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
if (typeof requestAnimationFrame === 'undefined') {
globalThis.requestAnimationFrame = setImmediate
if (typeof setImmediate !== 'undefined') {
globalThis.requestAnimationFrame = setImmediate
} else {
globalThis.requestAnimationFrame = (callback) => {
const now = Date.now()
callback(now)
return now
}
}
}
import '@tamagui/core/reset.css'
import '@tamagui/font-inter/css/400.css'
Expand Down
13 changes: 8 additions & 5 deletions apps/next/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[env.preview]
name = "t4-stack-preview"
workers_dev = true

[env.production]
name = "t4-stack"
compatibility_date = "2023-10-30"
send_metrics = false
node_compat = true
account_id = "b0f35235b34e83da001de73148cc561e"
route = "app.t4stack.com/*"
workers_dev = false

[env.preview]
name = "t4-stack-preview"
workers_dev = true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"npm-run-all": "^4.1.5",
"react-native-url-polyfill": "^2.0.0",
"typescript": "^5.2.2",
"workerd": "1.20231030.0"
"workerd": "1.20231218.0"
}
}
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
"bun-types": "^1.0.11",
"drizzle-kit": "^0.20.1",
"typescript": "^5.2.2",
"wrangler": "^3.15.0"
"wrangler": "3.22.2"
}
}
2 changes: 1 addition & 1 deletion packages/api/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const corsHandler = async (c: Context<{ Bindings: Bindings }>, next: Next) => {
)
}
return await cors({
origin: [c.env.APP_URL],
origin: (origin) => (origin.endsWith(new URL(c.env.APP_URL).host) ? origin : c.env.APP_URL),
credentials: true,
allowMethods: ['GET', 'POST', 'OPTIONS', 'PUT', 'DELETE'],
// https://hono.dev/middleware/builtin/cors#options
Expand Down
2 changes: 1 addition & 1 deletion packages/api/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "t4-rm-test-api"
compatibility_date = "2023-10-16"
compatibility_date = "2023-10-30"
send_metrics = false
node_compat = true
main = "src/worker.ts"
Expand Down

0 comments on commit 2cd1123

Please sign in to comment.