Repository navigation
build: Cloudflare Workers の静的アセットとして dist を配る - #4
Merged
Merged
Conversation
Workers Builds の wrangler deploy は設定が無いとリポジトリの直下を アセットとして上げようとし、node_modules の workerd (129 MiB) で落ちた。 wrangler.jsonc でデプロイ前に npm run build を回し、dist だけを上げる。 存在しない URL は 404.html を 404 で返す。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
t1nyb0x
added a commit
that referenced
this pull request
Oct 11, 2026
release: Cloudflare Workers の静的アセットとして配る (#4)
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
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.
何が起きたか
Cloudflare のプロジェクトは Pages ではなく Workers (Workers Builds) で作られていた。wrangler の設定が無いので
wrangler deployがリポジトリの直下をアセットとして上げようとし、node_modules/workerd/bin/workerd(129 MiB、上限 25 MiB) で落ちた。相棒の判断で Workers のまま進める。変えたこと
wrangler.jsonc:build.commandでnpm run buildを回し、assets.directoryは./dist、not_found_handlingは404-page。スクリプト (main) は持たないwebsite。ダッシュボードの Worker の名前と違うなら合わせるLUMORPHIA_ACCOUNTS_OPENは Workers Builds のビルドの環境変数で渡す確かめたこと
npm test13/13、npm run checknpx wrangler@4.42.0 deploy --dry-run: custom build がdistを作り、上げるのは dist だけ (0.34 KiB + アセット)🤖 Generated with Claude Code