wiziple / gatsby-plugin-intl

Gatsby plugin that turns your website into an internationalization-framework out of the box.
http://gatsby-starter-default-intl.netlify.com
325 stars 178 forks source link

Is storing of all localized page urls in page data scalable? #41

Closed andrejpavlovic closed 5 years ago

andrejpavlovic commented 5 years ago

I can't see this plugin scaling well when a site has many pages, since paths to all localized pages are stored in allSitePage. This can easily grow to megabytes in size. Am I missing something here?

jrestall commented 5 years ago

I agree, this plugin won't scale given the current implementation as each page will need to download a list of all the site's URLs, which could easily be huge given they multiply with each supported language.

@wiziple Is there any way around having the allSitePages in each page's context?

wiziple commented 5 years ago

I had to work around to find 404 page because currently matchPath has some issues. https://github.com/gatsbyjs/gatsby/issues/15101

This will be removed as soon as the gatsby team fixes the issue.

wiziple commented 5 years ago

this issue has been resolved on gatsby-plugin-intl@0.2.7