Firu
Firu
Explore posts from servers
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
{
"scripts": {
"prebuild": "shx rm -fr dist && shx mkdir -p dist && shx cp -ur 'public' 'dist/static'",
"build:css": "tailwindcss -i ./app/client/style.css -o ./dist/static/styles/style.css",
"build:scripts": "esbuild ./app/client/scripts/*.ts --outdir=./dist/static/scripts --minify --bundle",
"build:server": "esbuild --bundle app/server/index.tsx --format=esm --outfile=dist/_worker.js",
"dev:css": "bun run build:css -- --watch",
"dev:server": "bun run build:server -- --watch",
"dev:scripts": "bun run build:scripts -- --watch",
"dev:wrangler": "wrangler pages dev dist --live-reload",
"dev": "bun run prebuild && concurrently \"bun:dev:*\"",
"build": "concurrently \"bun:build:*\"",
"deploy": "bun run prebuild && bun run build && wrangler pages deploy dist"
},
{
"scripts": {
"prebuild": "shx rm -fr dist && shx mkdir -p dist && shx cp -ur 'public' 'dist/static'",
"build:css": "tailwindcss -i ./app/client/style.css -o ./dist/static/styles/style.css",
"build:scripts": "esbuild ./app/client/scripts/*.ts --outdir=./dist/static/scripts --minify --bundle",
"build:server": "esbuild --bundle app/server/index.tsx --format=esm --outfile=dist/_worker.js",
"dev:css": "bun run build:css -- --watch",
"dev:server": "bun run build:server -- --watch",
"dev:scripts": "bun run build:scripts -- --watch",
"dev:wrangler": "wrangler pages dev dist --live-reload",
"dev": "bun run prebuild && concurrently \"bun:dev:*\"",
"build": "concurrently \"bun:build:*\"",
"deploy": "bun run prebuild && bun run build && wrangler pages deploy dist"
},
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
I use wrangler for the development preview & the deployment scripts
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
thank you @Alex Kontos for pointing me to the right direction
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
I found a workaround for this. I ditched Vite in favor of manually using ESBuild / bun to bundle the server entry script into a _worker.js then serve static files following a similar approach to this tutorial on the Cloudflare Docs: https://developers.cloudflare.com/pages/framework-guides/deploy-a-hono-site/
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
No description
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
oh yup, even if you do not use the /supabase-auth module, it throws the error with wrangler
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
thanks for the heads up! i'll explore this once I implement auth later down the line
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
Yeah, it does work with workers. The issue only happens once I introduce the pages() honojs/vite-plugins/cloudflare-pages plugin. Here are my minimal repros for this: Hono Workers Template + Supabase | Worker /tasks Route Hono Pages Template + Supabase | Pages /tasks Route
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
I'm guessing it's because Supabase uses nodejs modules and it's not compatible with the Cloudflare Pages runtime environment.
19 replies
HHono
Created by Firu on 4/2/2024 in #help
Does Hono Cloudflare Pages work with `@supabase/supabase-js`?
I was able to use Supabase before with Hono in a small project, but without vite and simply served the files & ran the app via wrangler.
"scripts": {
"build:css": "tailwindcss -i ./public/style.css -o ./dist/_tailwind.css",
"dev:css": "npm run build:css -- --watch",
"dev:server": "wrangler dev src/index.tsx --assets dist --live-reload -e dev",
"dev": "concurrently \"npm:dev:*\"",
"deploy": "npm run build:css && wrangler deploy --minify src/index.tsx --assets dist"
},
"scripts": {
"build:css": "tailwindcss -i ./public/style.css -o ./dist/_tailwind.css",
"dev:css": "npm run build:css -- --watch",
"dev:server": "wrangler dev src/index.tsx --assets dist --live-reload -e dev",
"dev": "concurrently \"npm:dev:*\"",
"deploy": "npm run build:css && wrangler deploy --minify src/index.tsx --assets dist"
},
19 replies