Skip to content

feat(create): add a minimal vite:bare built-in template #3427

Closed as not planned
Closed as not planned

Description

@AXT-AyaKoto

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.json with the project name and vite-plus as 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 create workflow.

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

  1. 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.

  1. Use vite:application or vite:library and 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.

  1. Introduce a new vp init command

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:

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.

Activity

  1. jong-kyung commented on Nov 11, 2026

    @jong-kyung
    Collaborator

    vp add -D vite-plus already works in an empty directory without pnpm init, because it creates package.json for you.

    What would vite:bare add on top of that?

    cc/ @fengmk2

  2. self-assigned this
    on Nov 11, 2026
  3. AXT-AyaKoto commented on Nov 11, 2026

    @AXT-AyaKoto
    Author

    Oh, I didn't realize vp add could 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-plus already covers my use case.

    That said, I think there are still two aspects worth considering:

    • Discoverability: I assumed vp add required an existing package.json, so this behavior wasn't obvious to me. This could be addressed either by adding a vite:bare template or by documenting the implicit initialization behavior of vp add.
    • Consistency: Vite+ generally encourages using vp create to start new projects. Having a vite:bare template 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!

  4. AXT-AyaKoto commented on Nov 11, 2026

    @AXT-AyaKoto
    Author

    I noticed this issue was closed as not planned. I understand that vite:bare might not be necessary given the existing vp add -D vite-plus workflow.

    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 add would 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!

  5. jong-kyung commented on Nov 11, 2026

    @jong-kyung
    Collaborator

    Sorry for closing this without an explanation.

    I closed it because vp add -D vite-plus already covers the workflow you described, and I could not picture a project that would want only vite-plus installed with nothing else. Vite+ is a toolchain for web development, so the docs guide users to start from a template with vp create.

    Could you share what kind of project you were starting, and what did not fit in vite:application or vite: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.

  6. AXT-AyaKoto commented on Nov 11, 2026

    @AXT-AyaKoto
    Author

    Thanks for the explanation!

    To clarify, I don't intend to keep a project with only vite-plus installed. The idea is to use vite:bare as 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:

    my-project/
    ├── apps/
    │   ├── extension/  # Browser extension (WXT + Preact)
    │   └── docs/       # Documentation site (VitePress)
    └── packages/       # Shared utilities, etc.
    

    There are two cases where the existing templates don't quite fit:

    • WXT + Preact: WXT provides wxt init, but its official starter templates don't include Preact. I'd prefer to configure WXT with Preact manually rather than start from vite:application and remove unrelated Vite application boilerplate.
    • VitePress: Its official setup starts by installing the package and then running vitepress init. It doesn't provide a standalone create-* template that could be used through vp create.

    Ideally, I could initialize each package through Vite+'s existing vp create workflow:

    # From the monorepo root
    vp create vite:bare --directory apps/extension
    cd apps/extension
    vp add -D wxt @preact/preset-vite
    vp add preact
    # Configure WXT + Preact
    
    # Back at the monorepo root
    vp create vite:bare --directory apps/docs
    cd apps/docs
    vp add -D vitepress
    # Run the VitePress setup wizard

    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-plus already handles initialization in an empty directory, so I'm not suggesting that vite:bare is 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.

  7. jong-kyung commented on Nov 11, 2026

    @jong-kyung
    Collaborator

    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:generator scaffolds a generator package and registers it in create.templates, so you can define your own minimal template and run it with vp create <name>. Packages created this way go through the regular monorepo integration, which is the benefit you were looking for from vite: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-plus in an empty directory covers the single project case.

    In my personal opinion, these two cover both scenarios, so a built-in vite:bare template does not seem necessary. What do you think?

  8. AXT-AyaKoto commented on Nov 11, 2026

    @AXT-AyaKoto
    Author

    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:bare template 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-plus already 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:bare if the maintainers consider it worthwhile, I'd be happy with a documentation improvement instead.

    What do you think?

  9. jong-kyung commented on Nov 11, 2026

    @jong-kyung
    Collaborator

    Thanks, I understand the concern about one-off setups.

    About documenting it: creating package.json on add is 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.

  10. AXT-AyaKoto commented on Nov 11, 2026

    @AXT-AyaKoto
    Author

    Thanks for clarifying! I didn't realize that initializing a project through vp add was 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 add relies on initialization behavior that isn't guaranteed across package managers.
    • vite:application requires removing unnecessary boilerplate.
    • vite:generator adds 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:bare isn't the right solution.

    Thanks again for taking the time to discuss this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Fields

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions