Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vercel): fix vercel auto-detection and provide local vercel mode #246

Merged
merged 5 commits into from
May 3, 2021

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Apr 29, 2021

This fixes vercel auto-detection (note the issue was only with older deployments that didn't have system environment variables exposed to the build).

In addition, if vercel provider is manually selected, in development @nuxt/image will provide warnings if un-configured widths are used (or if no width is set manually) to prevent issues in deployment. As @nuxt/image is transpiled, this will be tree-shaken out in build.

@danielroe danielroe marked this pull request as draft April 29, 2021 10:51
src/provider.ts Outdated Show resolved Hide resolved
@danielroe danielroe changed the title fix(vercel): detect provider in build step too fix(vercel): fallback to static locally if not running in vercel environment Apr 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #246 (05f4982) into main (c11946f) will increase coverage by 0.02%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
+ Coverage   62.25%   62.27%   +0.02%     
==========================================
  Files          23       23              
  Lines         559      562       +3     
  Branches      162      162              
==========================================
+ Hits          348      350       +2     
- Misses        211      212       +1     
Impacted Files Coverage Δ
src/provider.ts 73.68% <80.00%> (-0.61%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c11946f...05f4982. Read the comment docs.

src/provider.ts Show resolved Hide resolved
@danielroe danielroe changed the title fix(vercel): fallback to static locally if not running in vercel environment fix(vercel): fix vercel auto-detection and provide local vercel mode Apr 30, 2021
@danielroe danielroe marked this pull request as ready for review April 30, 2021 15:13
@danielroe danielroe requested a review from pi0 May 3, 2021 08:24
@pi0 pi0 merged commit a156c66 into main May 3, 2021
@pi0 pi0 deleted the fix/vercel-detection branch May 3, 2021 08:59
procrates pushed a commit to procrates/nuxt-image that referenced this pull request Feb 21, 2023
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.

3 participants