Run the plugin under Vite+: `vite` alias, peer dependency, and a CI job
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- github-actions, typescript, vite
- Domain
- build-system, ci-cd, tooling
Research direction
Read the Vite+ page, status.md, docs/decisions.md, and ci.yml, then inspect the playground scripts and existing CI jobs. Validate the listed Vite+ scenarios, including SSR, i18n builds, extraction, and type checks; decide how to handle the peer dependency and playground formatting. Done means a pinned Vite+ CI job covers the requested commands and fetch, and the outcomes and decision are recorded in both docs.
Written by the indexing model from the issue text.
Description
Part of #13. Labels: feature.
The problem
The plugin imports from vite (createFilter, parseSync, createBuilder, parseAstAsync, and types) and declares peerDependencies.vite: ^8.3.0. A Vite+ project depends on vite-plus, and gets vite only as the alias vite: npm:@voidzero-dev/vite-plus-core@<version> that vp migrate writes when vite was already declared. Two consequences, both reproduced with [email protected] and the plugin at 0.2.0:
- A project with
vite-plusand noviteentry:vp buildfails to load the plugin (noviteinnode_modules). - A project with the alias: everything works (
vp dev,vp build,vp test,vp check), but the alias reports version1.5.0, so npm and yarn warn about the unmet^8.3.0peer, and pnpm only stays quiet because the migration addspeerDependencyRules.allowAny: [vite].
What to decide
- Keep importing from
viteand document the alias, the minimal change. Costs a peer warning on npm/yarn and one line in the docs. Or - Widen the peer range to admit the alias, e.g.
"vite": "^8.3.0 || npm:@voidzero-dev/vite-plus-core@*"(check what npm/pnpm accept for an aliased peer; it may needpeerDependenciesMeta.vite.optional: trueplus a clear runtime error). Or - Resolve
viteat runtime: tryvite, thenvite-plus(which re-exportsdefineConfig,lazyPlugins,defineProject,resolveConfigFromFileonly, so the helpers would still need@voidzero-dev/vite-plus-core). Most code, least warnings.
Recommendation: the first for now, documented in the Vite+ page and in status.md, and revisit when Vite+ documents a stable way for plugins to reach Vite's API.
CI
Add a vite-plus job to ci.yml that installs vite-plus at a pinned version (bump it like any dependency), then on the playground runs vp build, vp test run, starts vp dev and fetches a compiled component, and runs vp check (with --fix first if the playground isn't Oxfmt-formatted; decide whether the playground adopts Oxfmt or the job only checks lint and types). The playground keeps vite so it works both ways; it should not be migrated to Vite+ itself, so the repo's own tooling stays as it is.
Also check
ngp({ssr: true})undervp devandvp build(the SSR middleware and thessrenvironment optimizer).ngp-extract-i18nundervpx(vp migrateoffers to movetsxscripts tovpx).- The
i18noption's per-locale build undervp build. - Type-checking:
vp checkruns tsgo over the project and the plugin runs its own TypeScript 7 check invp build; the two agree on the spike. Document thatvp checkdoesn't check templates, the plugin does.
Record the outcome in status.md ("Vite+" row) and docs/decisions.md.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 1
- Avg merge
- 12h 24m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from push-based/vite-plugin-ngp
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
push-based/vite-plugin-ngp#33 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
push-based/vite-plugin-ngp#42 ·
Maintainers usually reply within 1 day
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 52/100
push-based/vite-plugin-ngp#41 ·
Maintainers usually reply within 1 day
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 50/100
push-based/vite-plugin-ngp#40 ·
Maintainers usually reply within 1 day
-
feature
Difficulty 3/5 1-2 days Newbie friendliness 55/100
push-based/vite-plugin-ngp#39 ·
Maintainers usually reply within 1 day
All issues in push-based/vite-plugin-ngp
Similar issues
-
area: web
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
inabagumi/shinju-date#6823 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel-labs/ui#540 ·
Maintainers usually reply within 1 day
-
accepted ai-dev ai-implementing
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
livesport/homer#218 · 1 comment ·
Maintainers usually reply within 1 day
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffixOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
figma/code-connect#419 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100