serverless-next.js icon indicating copy to clipboard operation
serverless-next.js copied to clipboard

Is AMP supported?

Open kpearson opened this issue 6 years ago • 3 comments

Describe the bug

Using @sls-next/[email protected]

I can not get the AMP version of the pages to load. The pages are built when next builds, but serverless-nextjs don't push them to S3 or render them serverside if they are not found in the S3 bucket. I apologies if I'm missing something obvious.

I really just want to know if AMP optimized pages are supported. If so just point me to the docs. I have looked through the docs and source code thoroughly for some reference to AMP, but I just can't find it.

For the moment I'm omitting repro steps, env, and other context. I'm happy to add all of it, including a sample app with the behavior I'm if it becomes relevant.

I'm creating this a bug because if it's not supported I think it should be (more clearly) stated somewhere. Myself and members of my team have look at this issue and simply can't find anything indicating whether AMP is supported or not. The only reason I think is should be supported is "full feature parity" with NEXT.JS 9.0.

I'm happy to submit a PR to address any of the above. I just need to know what direction to go. Add not supported to the docs, add here's how to the docs, or add the functionality to library. :-)

Thank you all for your wonderful work.

Actual behavior

Visiting the a given page with the query string amp=1 returns the non AMP page.

Expected behavior

Visiting the a given page with the query string amp=1 returns the AMP optimized page.

Checklist

  • [X] You have reviewed the README and FAQs, which answers several common questions.
  • [x] Consider using the latest release version, which may have already fixed your issue.

kpearson avatar Oct 02 '20 23:10 kpearson

Sorry that the docs are unclear. I think most of the supported features are listed under here: https://github.com/serverless-nextjs/serverless-next.js#features. If it's not listed there and the feature requires some server-side logic (e.g redirects, etc.), then I would say it's likely not supported, unless it's just undocumented. If it's listed but there's no checkmark, it may be in progress (e.g rewrites). I am not aware of any AMP logic as of now, so it should be unsupported.

Anyhow, I am not too familiar with AMP. If you have thoughts on how to design/implement it, feel free to add to this issue and we can discuss it.

@danielcondemarin we should probably make the README more accurate (e.g instead of full feature parity, maybe something like "aiming for full feature parity" instead), thoughts?

dphang avatar Oct 06 '20 03:10 dphang

@danielcondemarin we should probably make the README more accurate (e.g instead of full feature parity, maybe something like "aiming for full feature parity" instead), thoughts?

Yeah I've been meaning to rephrase that. Plus we could add a ... Found a next.js feature that isn't implemented? raise an issue here etc.

danielcondemarin avatar Oct 06 '20 09:10 danielcondemarin

Yes! Implementing support for next-amp would be a great feature. Is it on the roadmap for the next versions?

SMTC-Schmidt avatar Mar 15 '21 18:03 SMTC-Schmidt