Skip to content

_next folder name change #45422

Answered by willfolsom
TheHellTower asked this question in Help
Jan 30, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

@TheHellTower Not sure if you're still stuck on this, but you can do something like this:

cd into your build directory, possibly out/

grep -rl '/_next' * | xargs sed -i 's|/_next|/next2|g'

or

grep -rli '_next' * | xargs -I@ sed -i '' 's/_next/next2/g' @

Then rename the _next directory itself to next2 or whatever you want (as long as it matches the above command). If you're building to static, it'll likely be in the out/ directory.

Solved my problem with deploying two static Next projects on the same domain.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@TheHellTower
Comment options

@fcano-ut
Comment options

Answer selected by TheHellTower
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants