`cf deploy` duplicates the build step when `--prebuilt` flag is not used
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- typescript, vite
- Ambito
- build-system, cli, developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- TypeScript
- Stelle
- 916
- Fork
- 53
- Merge medio
- 19h 13m
- PR unite (30g)
- 185
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cf
-
cf deploy: Python Workers fail with 'No module named workers' because vendored modules are uploaded as ./python_modules/...Forse già presa @MattieTK l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cloudflare/cf#392 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cf#344 ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#262 ·
I maintainer di solito rispondono entro 1 giorno
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templateForse già presa @jamesopstad l’ha presa 10 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#223 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#179 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/cf
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
db-ux-design-system/core-web#8613 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
foxglove/mcap#1907 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug internal-plugin pr-welcome upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dsh-tauri-desk/deepseek-harness-desktop#1225 · 1 commento ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
unjs/unhead#1027 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno