Allow to set base URL for fetch
instead of full URL like: fetch('/api/url')
#64090
devjiwonchoi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Allow pathname for
fetch
instead of full URL for server components, middleware, etc.Background
Like useSWR, we can improve DX by using a shorter pathname.
We can manipulate the fetch to look for certain values.
Proposal
next.config.js
node environment
.env
.env.development
.env.production
Usage
Beta Was this translation helpful? Give feedback.
All reactions