Add configuration to specify assetDirectory#2186
Closed
gcpantazis wants to merge 4 commits into
Closed
Conversation
61d8bd2 to
9de4978
Compare
(Related to vercel#936; this is the more important bit for us at Thumbtack, but doing this enables me to restart work on vercel#936 so I wanted to get it in for review.) Currently the output static assets are stored in `/_next`, but this may not be ideal. At Thumbtack, we need to let the reverse proxies route traffic to several servers, including several Next servers eventually, so it's important that we're able to be very specific about where the static files are stored. This enables us to say: `assetDirectory: '/assets/fe/service-foo' in one app, and... `assetDirectory: '/assets/fe/service-bar' in another, and afterwards point traffic for those folders from the reverse proxies to the appropriate server. I'm sure others may have other use-cases for specifying the output directory, but this is our immediate need. As mentioned above, this is related to the configuration update in PR vercel#936, and merging this in enables us to move forward with restarting that task.
9de4978 to
c82a885
Compare
Contributor
Author
|
Pointed this to the v3 branch instead. |
This was referenced Jun 13, 2017
Contributor
|
Is this able to be configured at runtime or does it have to be set in the nextjs config? |
Contributor
Author
Contributor
|
Same as #936, lets move this into an issue if it's still relevant |
|
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Related to #936; this is the more important bit for us at Thumbtack,
but doing this enables me to restart work on #936 so I wanted to get
it in for review.)
Currently the output static assets are stored in
/_next, but thismay not be ideal. At Thumbtack, we need to let the reverse proxies route
traffic to several servers, including several Next servers eventually,
so it's important that we're able to be very specific about where
the static files are stored. This enables us to say:
assetDirectory: '/assets/fe/service-fooin one app, and...
assetDirectory: '/assets/fe/service-barin another, and afterwards point traffic for those folders from the
reverse proxies to the appropriate server. I'm sure others may have
other use-cases for specifying the output directory, but this is our
immediate need.
As mentioned above, this is related to the configuration update in
PR #936, and merging this in enables us to move forward with restarting
that task.