[feat]: build a subset of bundles with --bundle, for per-bundle task caching
I maintainer di solito rispondono entro 6 giorni
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- build-system, cli, tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 24
- Fork
- 13
- Merge medio
- 5g 3h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna 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 strapi/sdk-plugin
-
Difficoltà 4/5 Mezza giornata Idoneità per principianti 15/100
strapi/sdk-plugin#244 ·
I maintainer di solito rispondono entro 6 giorni
-
[bug]: build ignores exports file names and package.json#type, breaking "type": "module" pluginsForse già presa @unrevised6419 l’ha presa 44 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
strapi/sdk-plugin#242 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
strapi/sdk-plugin#241 ·
I maintainer di solito rispondono entro 6 giorni
-
[bug]: When building with latest sdk-plugin version, I loose sub folders typesForse di nuovo libera @jhoward1994 l’ha presa 247 giorni fa e non c’è nessuna pull request aperta. Apertaissue: bug
strapi/sdk-plugin#115 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 6 giorni
-
issue: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
strapi/sdk-plugin#111 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di strapi/sdk-plugin
Issue simili
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AOSSIE-Org/DebateAI#801 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
ci: repo has no GitHub Actions workflow, so pushes and pull requests are never built or testedApertaagents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Add: BOM CineApertaapproved check:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno