Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Investigate tradeoffs between redirects and copying files [to correct paths] #129

Closed
lindsaylevine opened this issue Jan 3, 2021 · 1 comment

Comments

@lindsaylevine
Copy link
Contributor

Per #75 (comment) on i18n PR:

I would love to get some insight about impact on HTTP request duration and about impact on build pipeline duration for two repos, one with 10K redirects and one with 10K pages à 100KB each. So that we can make an informed decision about the copy vs redirect approach for the naked routes without locale. I thought of this here, because this "hack" is needed because of the redirect approach.

We can either do something like /some/path /en/some/path 200 or we copy the file located at .next/serverless/pages/en/some/path.html to both out_publish/some/path.html and out_publish/en/some/path.html. After some discussion during i18n, we decided to stick with the redirect approach that was originally used at the start of the i18n work.

@lindsaylevine
Copy link
Contributor Author

i think the conclusion at the moment is that minimizing build times are a bigger priority and copying files is probably more costly than having many redirects. this is tangentially related to #123. we can re-address if redirects become a real issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants