Skip to content

Commit

Permalink
update version -> versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Aug 24, 2021
1 parent e19aabc commit 58ff62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced-features/i18n-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const getStaticPaths = ({ locales }) => {

For automatically statically optimized and non-dynamic `getStaticProps` pages a version of the page will be generated for each locale. This is important to consider since it can increase build times depending on how many locales are configured and what data fetching is being done inside of `getStaticProps`.

If you have 50 locales configured with 10 non-dynamic pages with `getStaticProps` this means `getStaticProps` will be called 500 times and 50 version of these 10 pages will be generated during each build.
If you have 50 locales configured with 10 non-dynamic pages with `getStaticProps` this means `getStaticProps` will be called 500 times and 50 versions of these 10 pages will be generated during each build.

To improve the performance of generating these pages during build time dynamic pages with `getStaticProps` and [a `fallback` mode](https://nextjs.org/docs/basic-features/data-fetching#fallback-true) can be leveraged instead. This allows you to return only the most popular paths and locales from `getStaticPaths` to prerender during the build and then lazily build the rest during runtime when they are requested.

Expand Down

0 comments on commit 58ff62d

Please sign in to comment.