Skip to content

Make create-vinext-app platform-agnostic #1033

@Divkix

Description

@Divkix

Right now create-vinext-app scaffolds every project with @cloudflare/vite-plugin, a wrangler.jsonc, and a worker/index.ts entry point. It only does Cloudflare Workers, end to end.

The main README says vinext works everywhere — Nitro, Node standalone, you name it — but the scaffolding tool doesn't give you any of those options. That gap is worth closing.

What needs to happen:

  • Platform selection in the CLI — probably a prompt or a --platform flag. Default stays Workers (it's the smoothest path), but allow picking nitro, standalone (Node), or none for just a bare Vite config.
  • Template variants per platform — Workers templates keep what they have now (Cloudflare plugin, wrangler, worker entry). Nitro templates swap the Cloudflare plugin for nitro/vite and drop wrangler. Standalone just runs vinext with no platform plugin.
  • Keep templates simple — no combinatorial explosion. A small set of composable sub-templates (platform-specific config + entry) that get layered over the shared app source is better than full template duplication.
  • Update the README — right now it says "optimized for Cloudflare Workers" everywhere. Should reflect that Workers is one option among several.

References:

This can land in a follow-up PR after #1032 merges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions