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

Hybrid Index Amp pages always shows the amp version in production. #14096

Closed
yassinebridi opened this issue Jun 11, 2020 · 6 comments
Closed

Comments

@yassinebridi
Copy link

Bug report

Describe the bug

When creating a hybrid Index Page, with a getStaticProps function, the index page in production will always show the amp page in domain.com and not in domain.com/index.amp

This works as expected in dev mode, where the non amp page will show in localhost and amp page in localhost?amp=1

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to https://github.com/yassinebridi/amp-prod, the master branch where the problem exist.
  2. deploy

Expected behavior

For the index page to show the non amp page first, and show the amp page, when going to domain.com/index.amp

Links

System information

  • Version of Node.js: v14.2.0

Additional context

This behavior doesn't occur in dynamic pages, where i would have getStaticPaths too, i didn't test it though.

@tomaszrondio
Copy link

is there any solution? I have similar problem but with dynamic pages generated on build. On runtime it works fine.

@yassinebridi
Copy link
Author

@tomaszrondio i'm not sure if this PR #17461 fixes the problem or not, try it out.

@tomaszrondio
Copy link

@tomaszrondio i'm not sure if this PR #17461 fixes the problem or not, try it out.

if I did it correctly it does not. I added changes directly to node_modules/next/dist/export/worker.js

@yassinebridi
Copy link
Author

if I did it correctly it does not. I added changes directly to node_modules/next/dist/export/worker.js

No just upgrade Next to this release:

https://github.com/vercel/next.js/releases/tag/v9.5.6-canary.1

@tomaszrondio
Copy link

nope. I does not help. I opened new issue yesterday about it. #18128

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants