-
Notifications
You must be signed in to change notification settings - Fork 1
Cloudflare Workersへ移設できるかの検証 #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SHR-ine
wants to merge
11
commits into
main
Choose a base branch
from
feat/cloudflare-trial
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for smarthr-design-system ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
smarthr-design-system | b685ddf | Oct 28 2025, 04:46 AM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Caution
検証中のためマージはしないでください。
課題・背景
https://kufuinc.slack.com/archives/C016ZH7ED9S/p1758508470335969
Cloudflare Workersへデプロイするために必要最低限の調整を行いました。
Cloudflare Workersについて
Cloudflare Workersはサーバレスアプリケーションを構築するためのサービスです。
従来までCloudflareでウェブサイトをホスティングする場合、Cloudflare Pagesを利用することが通常でしたが、2025年4月にCloudflare Workersでも同様の機能がサポートされ、現在はCloudflare Workersへの移行が推奨されています。
特長
制約
やったこと
@astrojs/cloudflare のインストールと有効化
smarthr-design-system/package.json
Lines 43 to 50 in d3834d7
@astrojs/cloudflare の最新バージョンに対応するため、Astro本体と一部ライブラリもアップデートしています。
smarthr-design-system/astro.config.mjs
Line 15 in d3834d7
Astro 5.xへの対応
参考: Upgrade to Astro v5
smarthr-design-system/tsconfig.json
Line 11 in d3834d7
smarthr-design-system/astro.config.mjs
Line 14 in d3834d7
smarthr-design-system/src/lib/getNestedHeadings.ts
Line 1 in d3834d7
Cloudflare Workersへの対応
smarthr-design-system/astro.config.mjs
Lines 50 to 72 in d3834d7
Node.jsの互換性のためのViteのバンドルから除外指定します。
smarthr-design-system/package.json
Line 99 in d3834d7
smarthr-design-system/wrangler.jsonc
Lines 5 to 14 in d3834d7
デプロイするためのWranglerのインストールと設定ファイルを用意します。
ファイルサイズ上限への対処
smarthr-design-system/public/.assetsignore
Lines 3 to 11 in d3834d7
25MBの上限があるため、一部の静的アセットを一旦デプロイ対象から除外しています。
別のストレージサービスに設置するなど対処が必要になります。
重複しているリダイレクト設定を削除
ビルドエラーになるため上記2箇所を削除、実際に有効になっている方を残しています。