-
Notifications
You must be signed in to change notification settings - Fork 270
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(nuxt-img): access prerender.env
only in server side
#661
Conversation
Tested and indeed fixes the issue. Thank you @chadsr |
Could also just do if (process?.env?.prerender) {
//...
} |
ccb4c4f
to
09320a5
Compare
Good point... I've switched it over to that syntax. |
Actually sorry, you are right about this. I just ran |
09320a5
to
7f76337
Compare
Looks like I fell for the same trap and only ran |
prerender.env
only in server side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* check if process is undefined before accessing prerender env * Update src/runtime/components/nuxt-img.ts Co-authored-by: pooya parsa <[email protected]>
resolves #660