Skip to content

Commit

Permalink
fix(web): not use env in cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Oct 2, 2024
1 parent dd8b1c8 commit 844350e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:

- name: Build
run: pnpm build:web
env:
cloudflare: 'true'

- name: Deploy
run: pnpm -C apps/frontend/web run deploy:worker
Expand Down
1 change: 0 additions & 1 deletion apps/frontend/web/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export default async function handleRequest(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
loadContext: AppLoadContext
) {
console.log(request.url, isSitemapUrl(request));
if (isSitemapUrl(request)) {
// @ts-ignore
return await sitemap(request, remixContext);
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"unocss-preset-flowind": "^0.0.3",
"unocss-preset-shadcn": "^0.3.1",
"unplugin-analytics": "^0.0.11",
"unplugin-info": "^1.2.0",
"unplugin-info": "^1.2.1",
"vite-tsconfig-paths": "^4.2.1"
}
}
3 changes: 2 additions & 1 deletion apps/frontend/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export default defineConfig({
* The base url of server
*/
SERVER_BASE
}
},
cloudflare: process.env.cloudflare === 'true'
}),
Analytics({
analytics: {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@
"unocss-preset-animations": "^1.1.0",
"unocss-preset-shadcn": "^0.3.1",
"unplugin-analytics": "^0.0.11",
"unplugin-info": "^1.2.0"
"unplugin-info": "^1.2.1"
}
}
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 844350e

Please sign in to comment.