Skip to content

Add configuration to specify assetDirectory#2186

Closed
gcpantazis wants to merge 4 commits into
vercel:masterfrom
gcpantazis:asset-directory
Closed

Add configuration to specify assetDirectory#2186
gcpantazis wants to merge 4 commits into
vercel:masterfrom
gcpantazis:asset-directory

Conversation

@gcpantazis
Copy link
Copy Markdown
Contributor

@gcpantazis gcpantazis commented Jun 7, 2017

(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 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 #936, and merging this in enables us to move forward with restarting
that task.

(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.
@gcpantazis gcpantazis changed the base branch from master to v3-beta June 11, 2017 18:22
@gcpantazis
Copy link
Copy Markdown
Contributor Author

Pointed this to the v3 branch instead.

@rgbkrk
Copy link
Copy Markdown
Contributor

rgbkrk commented Jul 5, 2017

Is this able to be configured at runtime or does it have to be set in the nextjs config?

@gcpantazis
Copy link
Copy Markdown
Contributor Author

@timneutkens timneutkens changed the base branch from v3-beta to master August 13, 2017 10:22
@timneutkens
Copy link
Copy Markdown
Contributor

Same as #936, lets move this into an issue if it's still relevant

@lock
Copy link
Copy Markdown

lock Bot commented May 10, 2018

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.

@lock lock Bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants