Join the Vite+ ecosystem: `vp create @push-based/ngp`, `vp migrate`, and docs for both
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- angular, typescript, vite
- Ambito
- tooling
Direzione di ricerca
Start with the linked sub-issues, especially #14–#18, and the repository's CLAUDE.md; this epic depends on a scaffolder, plugin compatibility work, documentation, and release automation. The issue records decisions and investigation results, but does not identify a single bounded change or completion check. It is complete when the listed sub-issues deliver the Vite+ create, migrate, documentation, and release paths.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Type: epic. Labels: feature, documentation.
Goal
An Angular developer with Vite+ installed runs one command and gets a working app built by vite-plugin-ngp:
vp create @push-based/ngp my-app
cd my-app
vp dev
An existing app that already uses the plugin runs vp migrate and keeps working. Both paths are documented on the site, including SSR and the rest of the Vite+ toolchain (vp test, vp check, vp lint, vp fmt, vp build, vp staged).
This issue records what was investigated, the decisions taken, and the sub-issues.
What was found (7 November 2026)
Sources: viteplus.dev/guide/create, viteplus.dev/config/create, viteplus.dev/guide/migrate, migration rules, and the source of packages/cli/src/create/ in voidzero-dev/vite-plus on main. Vite+ is at 1.5.0 on npm (4 November 2026). Spike results below were run locally on macOS with Node 26, pnpm 10.15, @push-based/[email protected] and [email protected].
How vp create <name> resolves a template
There is no registry and no hard-coded framework list. discovery.ts resolves the first argument in this order:
@scopeor@scope:<entry>→ reads@scope/createfrom npm and itspackage.json#createConfig.templatesmanifest, shows a picker.- A
namefromcreate.templatesin the rootvite.config.ts(monorepo-local only). vite:*→ built-ins (vite:applicationis justcreate-vite,vite:libraryisdegitof a tsdown template,vite:monorepois bundled).github:user/repoor a GitHub URL →degit.- Anything else is expanded the way
npm createdoes:@push-based/ngp→@push-based/create-ngp,ngp→create-ngp, run through the chosen package manager's runner (pnpm dlx create-ngp,npx create-ngp,yarn dlx,bun x), after an npm existence check. Three special cases exist (svelte→sv,nitro→create-nitro-app,@tanstack/start→@tanstack/cli); the "Popular Templates" list printed byvp create --listis display-only.
So vp create @push-based/ngp works the day @push-based/create-ngp is on npm, with no change upstream. What vp passes to the child:
- Arguments after the template name go through unchanged. The target directory is not prepended for npm templates (it is for
vite:applicationand GitHub templates), sovp create @push-based/ngp my-appruns@push-based/create-ngp my-app, and without a directory the scaffolder gets no args. --no-interactive,--package-manager,--git,--hooksare consumed by vp and not forwarded. Onlyvp create @push-based/ngp -- --no-interactivereaches the template.--directoryis rejected for npm templates.- No environment variable marks "running under vp". The child inherits
process.envwith vp's package-manager bin onPATH. (npm_config_user_agentis readable, as under anypnpm dlx.)
After the template exits, vp runs rewriteStandaloneProject on the new directory, then git init, agent/editor files, hooks, vp install, vp fmt. That rewrite:
- adds
vite-plusto devDependencies, and only ifviteis already declared points it atnpm:@voidzero-dev/vite-plus-core@<version>(viacatalog:andpnpm-workspace.yamloverrides under pnpm); - removes
vitestunless the project imports it directly, otherwise pins it to the bundled 5.1.0; - rewrites scripts:
vite→vp dev,vite build→vp build,vitest→vp test, adds"prepare": "vp config"; - rewrites
vite/vitestimports tovite-plusandvite-plus/testin config files and sources; - wraps the
pluginsarray inlazyPlugins(...)and injectsfmt: {}, alintblock (vite-plus/prefer-vite-plus-imports,typeAware,typeCheck) andstaged, unless the template's config already has those keys (fixed in #1836, June 2026); - writes
AGENTS.md,.vite-hooks/, and.gitignoreentries.
The @scope/create org picker, not pursued
Publishing @push-based/create with a createConfig.templates manifest would make vp create @push-based open a picker over org templates. It's an org-wide package with nothing tying it to ngp, and this project only owns ngp things, so it isn't part of this epic. Everything published here carries ngp in its name. If the org ever wants a picker, it's a separate package with its own owner, and its ngp entry would point at @push-based/create-ngp.
Getting into vp create --list and the default picker
Only by PR to vite-plus, as Svelte did (#857 → PR #982: a special case in expandCreateShorthand plus the display list). Worth asking once create-ngp has shipped and works under vp create unattended. Not a dependency for anything here.
Does the plugin run under Vite+ today? Yes, with one dependency detail
Spike 1, a fresh minimal app with [email protected], defineConfig from vite-plus, and ngp() from the published plugin:
| Command | Result |
|---|---|
vp build |
Builds; type-check runs; 97 kB index-*.js |
vp dev |
Serves; /src/app/app.ts comes back compiled; /@ngp/type-check-client.js injected |
vp test run (spec imports from vite-plus/test, jsdom, TestBed setup from the Testing page) |
1 passed, Vitest 5.1.0 |
vp check after vp check --fix |
passes: fmt, lint (type-aware) and tsgo type errors all clean on Angular sources |
vp lint with no .gitignore |
lints dist/ and node_modules/.pnpm/…/typescript.js. A _gitignore in the template avoids it |
The one catch: the plugin imports createFilter, parseSync, createBuilder, parseAstAsync and types from vite, and peer-depends on vite ^8.3.0. A project that depends only on vite-plus has no vite in node_modules, so the plugin fails to load. It works once vite is declared as npm:@voidzero-dev/[email protected] (what vp migrate and rewriteStandaloneProject write, but only when vite was already declared). So the template must declare vite and the docs must say so. The alias package's version is 1.5.0, which does not satisfy ^8.3.0; pnpm's migration adds peerDependencyRules.allowAny: [vite], npm/yarn users would see a peer warning. Sub-issue 2 handles this.
Spike 2, vp migrate --no-interactive on an app set up per the Getting started and Testing pages (plain [email protected], [email protected], vitest.config.ts): migration applied cleanly, exactly the rewrite listed above, and vp build, vp test and vp check passed afterwards. vitest.config.ts was kept, with its import rewritten to vite-plus. vp fmt reformatted the Angular sources to Oxfmt defaults (double quotes, 2-space), which is not the Angular style guide; a fmt block in the template can set singleQuote.
Patterns worth copying
- create-vite (the template
vite:applicationruns):@clack/prompts+mri,template-<name>/directories copied file by file,_gitignore→.gitignore,package.json#nameand<title>substituted, flags--template,--overwrite,--immediate/--no-immediate,--interactive/--no-interactive,--help, prints "Done. Now run:". vp passes--no-immediateto it so it doesn't install. - create-analog (the Angular precedent):
prompts+minimist, no non-interactive mode, no--help, runsgit inititself (which collides with vp's own git init). Don't copy that. - vp's own
_gitignore/_npmrc/_yarnrc.ymlrename convention, the same as create-vite's.
Decisions (agreed 7 November 2026)
- Publish
@push-based/create-ngpas thevp create @push-based/ngpandnpm create @push-based/ngpentry point. Scoped, like the plugin (decision 61): on npm only a scoped package belongs to the org. Both vp and npm expand@scope/nameto@scope/create-name, so the command stays one word. The cost is that the barevp create ngpdoesn't resolve to it until vite-plus adds a special case upstream (sub-issue #19). The name is free on npm (checked 7 November 2026). It lives in this repo atpackages/create-ngp, released by the same Nx release setup, and pins the same Angular and plugin versions as the plugin release it ships with. - No
@push-based/createorg package. It would be org-scoped with nongpin its name, so it doesn't belong to this project. The only package added is@push-based/create-ngp. The unscopedcreate-angular-appname is held by PushBased but not used: it reads as an official Angular scaffolder and names neither ngp nor PushBased. Decided 9 November 2026. - The template emits a plain Vite project and lets vp's post-create rewrite convert it. There is no reliable "running under vp" signal (
npm_config_user_agentsayspnpmeither way, and vp sets no variable), and spike 2 showed the rewrite does the right thing:vitealiased, scripts and imports rewritten,lazyPlugins,fmt/lint/stagedinjected.npm create @push-based/ngpusers get exactly what Getting started describes. The cost is that under vp the generatedvite.config.tsis rewritten after the fact, so the user sees a config nobody wrote by hand. The template declaresviteas a devDependency so the rewrite aliases it, and shipsfmt/lintkeys only if the injected defaults turn out wrong for Angular. Revisit when the first user asks. - Templates:
app(CSR, routing, Vitest spec) andapp-ssr(addsmain.server.ts,provideClientHydration, aserver.mjsfrom the playground). No Tailwind, Material or i18n options in v1; those are docs, not prompts. - One docs page,
site/content/vite-plus.md, "Using Vite+", in the Guide section, covering: create a new app, migrate an existing plugin app withvp migrate, migrate anng buildapp (point to the existing page, thenvp migrate), the toolchain commands and what each does with an Angular app, SSR undervp dev/vp build, and limits. Getting started gets a two-line pointer at the top. Status, Changelog, decisions and README entries per CLAUDE.md. - Don't change the plugin's peer range yet. Document the
vitealias and let the dependency question (sub-issue #15) decide whetherpeerDependencies.viteshould admit@voidzero-dev/vite-plus-coreor be dropped in favour of an optional import.
Sub-issues
- #14
@push-based/create-ngp: the scaffolder and its templates (packages/create-ngp) - #15 Run the plugin under Vite+: the
vitealias, peer dependency, and a CI job that runsvp build,vp dev,vp test,vp checkon the playground - #16 Docs: "Using Vite+" page, Getting started pointer, status/changelog/decision entries, README
- #18 Release: add the package to Nx release, the Publish workflow and trusted publishing; e2e that runs
vp create @push-based/ngpagainst the published package after each release - #19 Upstream: propose a bare
ngpshorthand and avp create --listentry once #14 and #18 have shipped, and report the two create-path gaps (no "under vp" signal for templates, target directory not prepended for npm templates)
Open questions
- Name of the shorthand.
vp create @push-based/ngpis what we control. A barengp, and even more soangular, need an upstream special case;angularmay be contested by the Angular team or Analog. Proposal: ship the scoped form, ask forngpin #19, leaveangularopen. - How much the template should assume about Vite+. See decision 3; the recommendation is "nothing" for v1.
- Angular pinning. Every generated
package.jsonpins22.3.0-next.4exactly, like the docs. The template has to be re-released with every plugin release that movesANGULAR_SHA. NxprojectsRelationship: fixeddoes that if both packages are in the release group. - Where
vp migrate'sprepare: vp configand.vite-hooksleave anng builduser who still hasangular.jsonand Husky. The migrate rules say Husky is left alone with a warning. Document it, don't solve it. - Windows. Vite+ runs on Windows; the plugin is untested there. The docs page says so.
- Lingua principale
- TypeScript
- Stelle
- 7
- Fork
- 0
- Merge medio
- 12h 24m
- PR unite (30g)
- 13
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 push-based/vite-plugin-ngp
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
push-based/vite-plugin-ngp#33 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
push-based/vite-plugin-ngp#42 ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
push-based/vite-plugin-ngp#41 ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
push-based/vite-plugin-ngp#40 ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
push-based/vite-plugin-ngp#39 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di push-based/vite-plugin-ngp
Issue simili
-
nb stats: the high-error-rate anomaly and the error-causes line give different cause splits for the same errorsForse già presa @jeanibarz l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
jeanibarz/agent-notebook#418 ·
I maintainer di solito rispondono entro 1 giorno
-
Page sections overlap each other on every page (e.g. Seasons, Actors and Reviews on show pages)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
josephfung/curia#2563 ·
I maintainer di solito rispondono entro 1 giorno
-
README demo: offer a controlled video variant next to the GIF for reduced motion and mobile dataApertaaccessibility
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
onetechgroupll/eigen-beam#26 ·
I maintainer di solito rispondono entro 1 giorno
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
killi199/time-tracking#532 ·
I maintainer di solito rispondono entro 1 giorno