-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Open
Labels
Pages RouterRelated to Pages Router.Related to Pages Router.good first issueEasy to fix issues, good for newcomersEasy to fix issues, good for newcomers
Milestone
Description
Bug report
Describe the bug
- When the page is built with Amp and SSG config, the output url of amp page becomes
/foo.amp
(routing ispages/[slug]
) - In the build phase, the non-amp page
/foo
refers to/foo.amp
in<link rel="amphtml">
correctly. - However when Incremental Static Regeneration is turned on, the
/foo.amp
is replaced with/foo?amp=1
To Reproduce
set
- amp: "hybrid"
- add
unstable_revalidate: 30
to getStaticProps return value.
reproduce:
https://github.com/wawoon/next-amp-ssg-reproduce
yarn build
yarn start
go to http://localhost:3000/foo
Expected behavior
The non amp page should always refer to/foo.amp
in <link rel="amphtml">
tag even if Incremental Static Regeneration is turned on.
Screenshots
initial access:
after 30sec
System information
- macOS
- Chrome
- Next: 9.4.5-canary.12
- Node: v12.14.1
Additional context
dailytargumdev
Metadata
Metadata
Assignees
Labels
Pages RouterRelated to Pages Router.Related to Pages Router.good first issueEasy to fix issues, good for newcomersEasy to fix issues, good for newcomers