Repository navigation
Description
Description
I'd like to initialize a Vite+ project from scratch without choosing a framework or an opinionated application/library template.
My typical workflow is to create an empty GitHub repository, clone it into my IDE, and initialize the project in the cloned directory using vp create --directory . (thanks to #1077!).
However, when none of the existing templates fit my project, I have to initialize package.json using a separate package manager command before I can start adding dependencies with vp add.
I'd like to use Vite+ commands for the entire setup process while keeping the project's structure and dependencies up to the developer.
Suggested solution
Add a new built-in template, vite:bare, which initializes a minimal Vite+ project without any framework-specific boilerplate.
For example, the workflow would be:
# Inside an existing empty Git repository
vp create vite:bare --directory .
vp add <packages>It should also support creating a new directory, like other built-in templates:
vp create vite:bare
cd my-project
vp add <packages>The generated project should contain:
- A minimal
package.jsonwith the project name andvite-plusas a dev dependency. - No framework-specific dependencies, source files, or example application code.
- Any necessary package manager files and optional setup files generated through the existing
vp createworkflow.
Ideally, this template would be available through both vp create vite:bare and the interactive template picker, and would support existing options such as --directory, --package-manager, and --no-interactive.
This would provide an unopinionated starting point that developers can customize using vp add, without introducing a separate initialization command.
Alternative
- Manually initialize the project with a package manager
For example:
pnpm init
vp add -D vite-plus
vp add <packages>This works, but requires using a separate package manager command to bootstrap the project instead of relying entirely on vp.
- Use
vite:applicationorvite:libraryand remove the unnecessary files
These templates work well for their intended use cases, but require additional cleanup when starting a project that doesn't fit either structure.
- Introduce a new
vp initcommand
This could also solve the problem, but adding a built-in template seems more consistent with the existing vp create workflow and requires no new top-level command.
Additional context
Related issues:
- Feature request: Add way to create project in cwd #1077 added support for initializing projects in the current directory with
vp create --directory .. - Add
vp initcommand as alias forvp create -directory .#1192 discussed introducingvp init, where the maintainers expressed a preference for usingvp createfor new projects andvp migratefor existing ones.
This proposal builds on that approach. It doesn't request changes to directory handling or a new command, only an additional built-in template for projects that don't need a predefined structure.
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Activity
jong-kyung commentedon Nov 11, 2026
vp add -D vite-plusalready works in an empty directory withoutpnpm init, because it createspackage.jsonfor you.What would
vite:bareadd on top of that?cc/ @fengmk2
AXT-AyaKoto commentedon Nov 11, 2026
Oh, I didn't realize
vp addcould initialize a project in an empty directory!My main goal was to start a minimal Vite+ project without using a separate package manager command, so
vp add -D vite-plusalready covers my use case.That said, I think there are still two aspects worth considering:
vp addrequired an existingpackage.json, so this behavior wasn't obvious to me. This could be addressed either by adding avite:baretemplate or by documenting the implicit initialization behavior ofvp add.vp createto start new projects. Having avite:baretemplate would let developers follow that same workflow even when they don't need a predefined project structure.I'm not sure these benefits justify adding another built-in template, so I'll leave that judgment to the maintainers. I'd appreciate your thoughts on whether either approach would be worthwhile.
Thanks for pointing this out!
AXT-AyaKoto commentedon Nov 11, 2026
I noticed this issue was closed as not planned. I understand that
vite:baremight not be necessary given the existingvp add -D vite-plusworkflow.However, I'm not sure whether the discoverability and consistency concerns I mentioned were considered, since the issue was closed without further explanation.
Could you clarify whether the decision is that the current workflow is sufficient as-is, or whether improvements such as documenting the implicit initialization behavior of
vp addwould still be welcome?I'm not necessarily asking to reopen this issue. I'd just like to better understand the reasoning behind the decision.
Thanks!
jong-kyung commentedon Nov 11, 2026
Sorry for closing this without an explanation.
I closed it because
vp add -D vite-plusalready covers the workflow you described, and I could not picture a project that would want onlyvite-plusinstalled with nothing else. Vite+ is a toolchain for web development, so the docs guide users to start from a template withvp create.Could you share what kind of project you were starting, and what did not fit in
vite:applicationorvite:library? A concrete example would help us decide whether this is worth a template or a docs change. I am happy to reopen the issue if there is a case we are missing.AXT-AyaKoto commentedon Nov 11, 2026
Thanks for the explanation!
To clarify, I don't intend to keep a project with only
vite-plusinstalled. The idea is to usevite:bareas a minimal starting point before adding the framework and dependencies I actually need.One concrete scenario I have in mind is a Vite+ monorepo structured like this:
There are two cases where the existing templates don't quite fit:
wxt init, but its official starter templates don't include Preact. I'd prefer to configure WXT with Preact manually rather than start fromvite:applicationand remove unrelated Vite application boilerplate.vitepress init. It doesn't provide a standalonecreate-*template that could be used throughvp create.Ideally, I could initialize each package through Vite+'s existing
vp createworkflow:The main benefit I'm looking for is a consistent way to create minimal workspace packages through
vp create, including its monorepo integration, without being tied to a particular framework template.I understand that
vp add -D vite-plusalready handles initialization in an empty directory, so I'm not suggesting thatvite:bareis strictly necessary. However, I think it could make these monorepo workflows more straightforward and consistent.I hope this clarifies the use case. I'd be interested to hear whether you think this is worth supporting through a built-in template or whether a documented workflow using existing commands would be preferable.
jong-kyung commentedon Nov 11, 2026
Thanks for the detailed explanation, that makes sense.
For the monorepo case you described, I think code generators are a good fit.
vp create vite:generatorscaffolds a generator package and registers it increate.templates, so you can define your own minimal template and run it withvp create <name>. Packages created this way go through the regular monorepo integration, which is the benefit you were looking for fromvite:bare. You could also go one step further and turn your WXT with Preact setup or your VitePress setup into templates.Outside a monorepo,
vp add -D vite-plusin an empty directory covers the single project case.In my personal opinion, these two cover both scenarios, so a built-in
vite:baretemplate does not seem necessary. What do you think?AXT-AyaKoto commentedon Nov 11, 2026
Thanks for the suggestion! I agree that code generators would technically cover this use case, including monorepo integration.
My concern is that I'm not looking to create reusable templates. I just want to initialize a couple of packages for a specific project, potentially with different frameworks each time. Creating and maintaining a custom generator for a one-off setup feels like more overhead than the initialization itself.
I still think a built-in
vite:baretemplate would be a convenient and consistent way to handle this. However, I also understand that adding another built-in template comes with a maintenance cost, which may not be justified for this use case.Given that
vp add -D vite-plusalready works in an empty directory, I think documenting this workflow would be a reasonable and lightweight solution. For example, a short section explaining how to initialize a minimal project without a template, including how to use that approach within an existing monorepo, would make the option much easier to discover.So while I'd still welcome
vite:bareif the maintainers consider it worthwhile, I'd be happy with a documentation improvement instead.What do you think?
jong-kyung commentedon Nov 11, 2026
Thanks, I understand the concern about one-off setups.
About documenting it: creating
package.jsononaddis a side effect of the underlying package manager, not a Vite+ feature. The package managers themselves do not document it as a way to initialize a project, and the behavior is not the same across all of them. So in my personal opinion, it would be odd for Vite+ to document it as an official workflow.For a one-off package, the existing options should be enough for now.
AXT-AyaKoto commentedon Nov 11, 2026
Thanks for clarifying! I didn't realize that initializing a project through
vp addwas an incidental behavior of the underlying package manager rather than something Vite+ guarantees.That actually makes me think there's another benefit to
vite:bare: it could provide a consistent, officially supported way to initialize a minimal project regardless of the package manager.To clarify, this isn't limited to monorepos. I'd also like to use Vite+ for standalone WXT + Preact projects, where the existing application and library templates don't quite fit.
I agree that the existing options make these setups possible, but I still find the developer experience less than ideal:
vp addrelies on initialization behavior that isn't guaranteed across package managers.vite:applicationrequires removing unnecessary boilerplate.vite:generatoradds significant setup overhead for a one-off project.I understand that maintaining another built-in template has a cost, and I don't want to push for a feature that the maintainers don't consider worthwhile.
However, I'd like to ask: What is the recommended, officially supported way to initialize a minimal Vite+ project (or a package within an existing monorepo) when none of the built-in templates fit?
If there's an existing workflow I've overlooked, I'd be happy to use it. Otherwise, I think there's still a small gap in the current developer experience, even if adding
vite:bareisn't the right solution.Thanks again for taking the time to discuss this!