Skip to content

Commit 103c8f5

Browse files
authored
Revert "chore: static assets cdn"
1 parent 152f77f commit 103c8f5

File tree

4 files changed

+2
-119
lines changed

4 files changed

+2
-119
lines changed

Diff for: apps/web/next.config.mjs

-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import webpack from 'webpack'
55

66
/** @type {import('next').NextConfig} */
77
const nextConfig = {
8-
assetPrefix: getAssetPrefix(),
98
reactStrictMode: false,
109
env: {
1110
NEXT_PUBLIC_PGLITE_VERSION: await getPackageVersion('@electric-sql/pglite'),
@@ -86,20 +85,3 @@ async function getPackageVersion(module) {
8685
const packageJson = await getPackageJson(module)
8786
return packageJson.version
8887
}
89-
90-
function getAssetPrefix() {
91-
// If not force enabled, but not production env, disable CDN
92-
if (process.env.FORCE_ASSET_CDN !== '1' && process.env.VERCEL_ENV !== 'production') {
93-
return undefined
94-
}
95-
96-
// Force disable CDN
97-
if (process.env.FORCE_ASSET_CDN === '-1') {
98-
return undefined
99-
}
100-
101-
// @ts-ignore
102-
return `https://frontend-assets.supabase.com/${
103-
process.env.SITE_NAME
104-
}/${process.env.VERCEL_GIT_COMMIT_SHA.substring(0, 12)}`
105-
}

Diff for: apps/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "npm run build:sw && next dev",
7-
"build": "npm run build:sw && next build && ./../../scripts/upload-static-assets.sh",
7+
"build": "npm run build:sw && next build",
88
"build:sw": "vite build",
99
"start": "next start",
1010
"lint": "next lint",

Diff for: scripts/upload-static-assets.sh

-94
This file was deleted.

Diff for: turbo.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@
3939
"KV_*",
4040
"SUPABASE_*",
4141
"LOGFLARE_*",
42-
"REDIRECT_LEGACY_DOMAIN",
43-
"AWS_ACCESS_KEY_ID",
44-
"AWS_SECRET_ACCESS_KEY",
45-
"FORCE_ASSET_CDN",
46-
"ASSET_CDN_S3_ENDPOINT",
47-
"SITE_NAME"
42+
"REDIRECT_LEGACY_DOMAIN"
4843
],
4944
"outputs": [".next/**", "!.next/cache/**"],
5045
"cache": true

0 commit comments

Comments
 (0)