question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vite-plugin-vercel

See original GitHub issue

vite-plugin-ssr already supports Vercel https://vite-plugin-ssr.com/vercel but it would be lovely to have a vite-plugin-vercel so that the entire Vite ecosystem can benefit.

Discussoin about this: https://discord.com/channels/815937377888632913/815937377888632916/915547793987350548

I’ve secured the npm package and I’m happy to give it away.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:46 (45 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Mar 15, 2022

I think it would be better that if both vite-plugin-ssr and vite-plugin-vercel are installed, the user does not have to manually set the prerender function in vite.config.js.

Yes. Ideally, and I think it’s possible, everything would just work without the user having to do anything.

I lean a little towards storing those in their respective framework (i.e. in vite-plugin-ssr, telefunc, etc.)

I agree. For the current prototyping phase, if you want for the sake of dev speed, we can store this prerender function at vite-plugin-vercel.

1reaction
brilloutcommented, Mar 13, 2022

The thin wrapper around vps’s prerender CLI would provide page-specific configs, so that the user can do this:

// /pages/product.page.js

// Overrides the default
export const initialRevalidateSeconds = 10

// The usual stuff
export { Page }
// ...

share logic between dev (e.g. express) and prod (e.g. vercel)

@cyco130 is actually working on that (https://github.com/hattipjs/hattip — there isn’t any documentation yet).

Read more comments on GitHub >

github_iconTop Results From Across the Web

magne4000/vite-plugin-vercel - GitHub
This is a Work In Progress Vercel adapter for vite . Its purpose is to help you bundle your application in .vercel folder...
Read more >
Vercel - vite-plugin-ssr
vite -plugin-vercel enables zero-configuration support for all Vercel features, including Incremental Static Regeneration (ISR) and Edge Middleware. If we pre- ...
Read more >
vite-vercel - npm
Start using vite-vercel in your project by running `npm i vite-vercel`. There are no other projects in the npm registry using vite-vercel.
Read more >
Vite Plugin Dart
A test page for vite-plugin-dart.
Read more >
Deploying a Static Site - Vite
- To deploy, `cd vite` and run `vercel`. Vercel for Git #. Push your code to your git repository (GitHub, GitLab, Bitbucket).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found