adrai / bug-next-i18next-multitenant

A reproduction of a next-i18next bug in a multi-tenant app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reproduction of next-i18next bug with multi-tenant app

To see to bug:

  • Run the app npm run dev
  • Open the root page http://localhost:3000 and you'll get 404 (Not Found)
  • Open a different page http://localhost:3000/works and the page (including translation) loads just fine

Same thing happen when visiting the site as a different tenant:

  • Open the root page http://foo.localhost:3000 and you'll get 404 (Not Found)
  • Open a different page http://foo.localhost:3000/works and the page (including translation) loads just fine

To see that without next-i18next it works ok

  • Comment out the i18n from next.config.js
  • Comment out appWithTranslation from pages/_app.tsx
  • Comment out translations from pages pages/web/[tenant]/index.tsx and pages/web/[tenant]/works.tsx
  • Commnet out ...(await serverSideTranslations(locale, [ 'common' ])) from getStaticProps within the same pages

About

A reproduction of a next-i18next bug in a multi-tenant app


Languages

Language:TypeScript 81.1%Language:JavaScript 11.5%Language:CSS 7.4%