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.

[nuxt3][vercel] Feature request: Support vercel provider for static app (nuxt generate)

See original GitHub issue

Feature

Feature request: Support (nuxt3) nuxt/image with vercel provider for static app -> nuxt generate.

Expected

Vercel config is generated and contains the “images” property which configures the Image Optimization feature.

Actual

Website is generated, <nuxt-image> components are processed fine, but vercel config does not contain the “images” property.

Reproduction example

https://github.com/hartmut-co-uk/nuxt3-generate-static-vercel-image

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hartmut-co-ukcommented, Sep 16, 2022

Many thanks for the ref @mrdannyjohnson!

I’d guess this work item would mean image variants (srcset) are actually generated + packaged at pre-render (‘generate’) time using e.x. IPX?

Basically I might even prefer this option - but as far as this issue is concerned the Vercel Image Optimization(https://vercel.com/docs/concepts/image-optimization) should be used. Basically the website is static, pre-rendered - but using vercel images, like when running on nitro, SSR…

Example

  1. nuxt3 default using nuxt build, nitro, SSR via vercel edge function
    -> https://nuxt3-generate-static-vercel-image-lb046wh8w-info301.vercel.app/)
  2. vs. result of nuxt generate
    -> https://nuxt3-generate-static-vercel-image-7scsed04t-info301.vercel.app/
0reactions
hartmut-co-ukcommented, Nov 17, 2022

The page in question has only a hand full of routes, as some sort of workaround, I was able to solve what I was trying to achieve by simply configuring all my routes for prerender:

    nitro: {
        prerender: {
            routes: ['/', '/a', '/b', '/c']
        }
    },

It’s deployed to vercel and not served via nitro functions but static as expected. Vercel image provider is still getting configured and working.

ℹ️ I’ll keep the issue open, since I think it would still be good to have vercel image provider working with nuxt generate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vercel - Nuxt
How to deploy a Nuxt app with Vercel? Static site with Vercel. If you would like to deploy a static site on Vercel,...
Read more >
Vercel Builder for Nuxt - GitHub
This Vercel builder takes a Nuxt application defined by a nuxt.config.js (or .ts ) entrypoint and deploys it as a serverless function in...
Read more >
Image Optimization Examples with Next.js and Nuxt - Vercel
Learn how to use next/image and nuxt/image to optimize your images. ... optimizes your images on-demand and serves them from the Vercel Edge...
Read more >
An ultimate guide to CICD for your Nuxt.js Application
This tutorial will demonstrate how to build, test, and deploy your Nuxt.js Application to GitHub Pages using CircleCI.
Read more >
Using LaunchDarkly with Next.js
For example, new code checked into your git repository triggers a build in Netlify or Vercel, two popular deployment options for Next.js ...
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