Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: i18n-routing has a huge mistake #38699

Closed
dimaMachina opened this issue Jul 15, 2022 · 2 comments
Closed

Docs: i18n-routing has a huge mistake #38699

dimaMachina opened this issue Jul 15, 2022 · 2 comments
Labels
Documentation Related to Next.js' official documentation.

Comments

@dimaMachina
Copy link

dimaMachina commented Jul 15, 2022

What is the improvement or update you wish to see?

image

It's recommends use follow regex:
const PUBLIC_FILE = /\.(.*)$/

BUT when we have foo.bar.js page

/\.(.*)$/.test('/foo.bar')
// true

Is there any context that might help us understand?

Pages that include dots should not be treated as public files, so example need to be changed.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/advanced-features/i18n-routing

@dimaMachina dimaMachina added the Documentation Related to Next.js' official documentation. label Jul 15, 2022
@dimaMachina dimaMachina changed the title Docs: i18n-routing has a huge bug Docs: i18n-routing has a huge mistake Jul 15, 2022
@balazsorban44
Copy link
Member

balazsorban44 commented Jul 15, 2022

Hi, that is just a general example that works for most use cases. There is probably no one-size-fits-all pattern to cover all use cases, but you can add your own logic to extend it for your needs. If you know the type of files you have, you could tweak the regex to only match those for example.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

No branches or pull requests

2 participants