remove assetPrefix in normalizeRoute fn#2002
Closed
tscanlin wants to merge 1 commit into
Closed
Conversation
Contributor
|
Serving Next.js apps from multiple directories is not a goal of Next.js at the moment. |
Contributor
Author
|
FWIW it seems that this fix solved the issue for multiple next apps on one domain: #257 It would be awesome if we could get this landed. |
Contributor
|
+1 for this - I'm trying to run Next though an express app to power my admin console. |
Contributor
|
#2186 would supercede this by making the
|
Contributor
|
We are following the same approach with different |
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.
This change makes it so you can easily serve multiple static next apps from subfolders on the same domain using the already available assetPrefix option.
Without this change the file that's requested is like:
/${assetPrefix}/_next/c0bae9f4-37d0-4f02-8a91-08fe02d6fbfb/page/${assetPrefix}/index.jsinstead of:
/${assetPrefix}/_next/c0bae9f4-37d0-4f02-8a91-08fe02d6fbfb/page/index.jslike you'd want.