`cf deploy` duplicates the build step when `--prebuilt` flag is not used
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- typescript, vite
調査の方向性
Start with the cf deploy and cf build command entry points and reproduce the behavior using the commands and Vite+ setup described in the issue. Compare how --prebuilt, existing .cloudflare/output/v0, and project build scripts are handled; done means the chosen behavior avoids an unintended duplicate build without breaking deployment.
索引モデルが issue の本文から書いたものです。
説明
In Cloudflare's dashboard, "build" and "deploy" are two separate steps, and cf deploy builds automatically without setting --prebuilt. This is quite confusing when migrating from wrangler (e.g., a drop-in replacement of npx wrangler deploy with npx cf deploy) and causes several issues when the deploy command is set to pnpm|npx cf deploy:
- It duplicates the build.
cfruns its own build step again even when the build command was set and executed. Unnecessarily increases build time. - There is a risk of unexpected overwriting of object code when
cf's chosen build script differs from the user's. This can be very difficult to debug in certain edge cases. - This behavior cannot be configured. Seems like
cfdetects the project layout and chooses the toolchain automatically. There is no config item to set a build script. - Specifically, for projects using Vite+, where
vitewas linked tonpm:@voidzero-dev/[email protected]and theviteCLI was never installed,cfwill attempt to invokepnpm vite buildand fail. npx cf buildworks for Vite+, but at the cost of downloading Vite again vianpx vite build. This also brings the risk of version disparity.
Possible solutions:
- Add hints on unsetting the build script when using
cf deploy. - Allow configuring the build script in
cloudflare.config.ts, mirroring wrangler. This should also smooth migration from wrangler, although the targeted UX seems to be eliminating this option. - Maybe skip building automatically on deploy when
.cloudflare/output/v0exists. Of course, with a flag to enforce it, like--build. - Would appreciate it if
cfcould add support for Vite+.
Off topic: I love the new CLI, much beyond wrangler, and congrats to the team who shipped such a great tool!
- 主要言語
- TypeScript
- スター
- 916
- フォーク
- 53
- 平均マージ
- 18時間 42分
- マージ済み PR(30日)
- 199
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/cf のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/cf#344 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/cf#262 ·
メンテナーはふだん 1 日以内に返信
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` template対応中かも @jamesopstad が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/cf#223 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cloudflare/cf#179 ·
メンテナーはふだん 1 日以内に返信
-
Ctrl+C leaves `cf dev` stuck at "Terminate batch job (Y/N)?" on Windows in npm projects再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
cloudflare/cf#412 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
awslabs/visual-asset-management-system#804 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
restatedev/sdk-typescript#813 ·
-
bug desktop P1 session XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Merit-Systems/x402scan#1312 ·
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Azure/apiops-cli#331 ·
メンテナーはふだん 3 日以内に返信