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
SSG AMP hybrid mode dynamic route adds "amp":1 to context on build in non AMP article.json #18128
Comments
#17461 does not fix this problem |
I moved my logic that was based on context to useAmp hook and it fixed the issue. |
Can you please share a snippet of how you did that. |
I was having logic in |
Oh yeah, that's actually the recommended way to do it. |
I believe that sooner or later there will be a case when someone will really need to know if |
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. |
Bug report
Describe the bug
When using a dynamic route in hybrid mode with getStaticProps and getStaticPaths, all static generated files have added
amp: 1
to context.E.g if getStaticPaths returns /article for [slug].js then these files are generated:
and in
article.json
context isSo first visit on article loads AMP component . Everything goes back to normal once revalidated.
To Reproduce
https://github.com/SuperdeskWebPublisher/publisher-pwa
context
(value of context.params is added to pageProps)Expected behavior
Article.json context should not contain
amp: 1
System information
Additional context
this may be connected: #17245
The text was updated successfully, but these errors were encountered: