[feat]: build a subset of bundles with --bundle, for per-bundle task caching
Los mantenedores suelen responder en 6 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- build-system, cli, tooling
Línea de trabajo
Review the build, watch, and verify command entry points alongside package.json exports. Exercise --bundle with single, repeated, comma-separated, omitted, unknown, duplicate, and empty selections. Done means each command can target exact export keys while the default behavior remains unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A clear and concise description of what the feature is
strapi-plugin build always builds every bundle declared in package.json exports. A --bundle <name> flag would restrict the run to a subset, where a name is an export key such as ./strapi-admin, ./strapi-server or a custom one.
strapi-plugin build --bundle ./strapi-admin
strapi-plugin build --bundle ./strapi-server,./shared
Why should this feature be included?
Task runners with caching (Nx, Turborepo) key a cache entry on a task's inputs and outputs. Each bundle already has its own output directory (dist/admin, dist/server), but because one command produces all of them, they can only be declared as a single task with dist as its output. Touching a server file therefore invalidates the admin bundle too, and the admin build re-runs for nothing.
With --bundle, each bundle becomes its own task with its own inputs and outputs, so a change in one does not invalidate the cache of the others:
"build-admin": { "command": "strapi-plugin build --bundle ./strapi-admin", "outputs": ["{projectRoot}/dist/admin"] },
"build-server": { "command": "strapi-plugin build --bundle ./strapi-server", "outputs": ["{projectRoot}/dist/server"] }
The same argument applies to watch (watch only the bundle being worked on) and to verify (check the files of a plugin built one bundle at a time).
Please provide an example for how this would work
Omitting the flag keeps today's behaviour. The flag is repeatable and accepts a comma-separated list, and names are matched exactly against the export keys, so an unknown, duplicated or empty selection fails rather than silently building everything.
I have a working implementation for build, watch and verify and am happy to open a PR if this is something you would consider.
- Lenguaje dominante
- TypeScript
- Estrellas
- 24
- Forks
- 13
- Merge medio
- 5 d 3 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin 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 strapi/sdk-plugin
-
Dificultad 4/5 Medio día Aptitud para principiantes 15/100
strapi/sdk-plugin#244 ·
Los mantenedores suelen responder en 6 días
-
[bug]: build ignores exports file names and package.json#type, breaking "type": "module" pluginsPosiblemente ocupada @unrevised6419 la tomó hace 44 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
strapi/sdk-plugin#242 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
strapi/sdk-plugin#241 ·
Los mantenedores suelen responder en 6 días
-
[bug]: When building with latest sdk-plugin version, I loose sub folders typesQuizá libre de nuevo @jhoward1994 la tomó hace 248 días y no hay ningún pull request abierto. Abiertoissue: bug
strapi/sdk-plugin#115 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 6 días
-
issue: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 58/100
strapi/sdk-plugin#111 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
Todos los issues de strapi/sdk-plugin
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-webui/tether#52 ·
Los mantenedores suelen responder en 1 día
-
`void platform install --app-access public` fails when Cloudflare reports Access is disabledAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/void#835 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AykutSarac/jsoncrack.com#616 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melgarafael/DeskcommCRM#4679 ·
Los mantenedores suelen responder en 1 día