`cf deploy` duplicates the build step when `--prebuilt` flag is not used
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- typescript, vite
- Área
- build-system, cli, developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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!
- Lenguaje dominante
- TypeScript
- Estrellas
- 853
- Forks
- 42
- Merge medio
- 17 h 59 min
- PR fusionados (30 d)
- 145
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cloudflare/cf
-
`cf complete zsh >> .zshrc` fails on vanilla zshQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cloudflare/cf#340 ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/cf#262 ·
Los mantenedores suelen responder en 1 día
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePosiblemente ocupada @jamesopstad la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cloudflare/cf#223 · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cloudflare/cf#179 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 Medio día Aptitud para principiantes 45/100
cloudflare/cf#326 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de cloudflare/cf
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
anomalyco/opencode#56380 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
BUG | `MCP 服务器` | 全局层行的停用/启用与删除报 404 server row not found,编辑保存会在 profile 层复制出重复行Posiblemente ocupada @w6242652 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Chocobozzz/PeerTube#7832 ·
Los mantenedores suelen responder en 3 días
-
Pay to use?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
darkreader/darkreader#16108 · 1 comentario ·
Los mantenedores suelen responder en 2 días