Skip to content

Conversation

@jog1t
Copy link
Collaborator

@jog1t jog1t commented Jan 13, 2026

TL;DR

Simplified the Vite configuration for srvx and added Vercel Edge Functions deployment support.

What changed?

  • Simplified the vite.config.ts example by removing the conditional outDir configuration
  • Streamlined build scripts in package.json to use a single build command
  • Renamed preview script to start for clarity
  • Added support for Vercel Edge Functions deployment via a new framework option
  • Updated the plugin architecture to use three separate plugins (dev server, client build, server build)
  • Added documentation for the new Vercel deployment option
  • Added a new example for Vercel Edge Functions deployment
  • Improved code formatting and organization

How to test?

  1. Use the simplified configuration:
export default defineConfig({
  plugins: [
    ...srvx({
      entry: './src/server.ts',
    }),
  ],
})
  1. Run the build with the updated scripts:
npm run build  # Runs both client and server builds
npm run start  # Starts the production server
  1. For Vercel deployment, add the framework option:
...srvx({
  entry: './src/server.ts',
  framework: 'vercel'
})

Why make this change?

The changes simplify the configuration and build process, making it more intuitive for users. The addition of Vercel Edge Functions support expands deployment options, allowing developers to easily deploy srvx applications to Vercel's edge network. The restructured plugin architecture provides better separation of concerns and more flexibility for advanced use cases.

@jog1t jog1t marked this pull request as ready for review January 13, 2026 01:07
Copy link
Collaborator Author

jog1t commented Jan 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jog1t jog1t mentioned this pull request Jan 13, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/rivet-dev/vite-plugin-srvx@2

commit: b15ccf3

Copy link
Collaborator Author

jog1t commented Jan 13, 2026

Merge activity

  • Jan 13, 1:07 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 13, 1:07 AM UTC: @jog1t merged this pull request with Graphite.

@jog1t jog1t merged commit 1054fe6 into main Jan 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants