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

AMP support #274

Merged
merged 4 commits into from
Dec 15, 2020
Merged

AMP support #274

merged 4 commits into from
Dec 15, 2020

Conversation

Rich-Harris
Copy link
Member

This adds AMP support, which entails the following:

  • a new config option, kit.amp
  • `import { amp } from '$app/env';
  • at dev time, pages are validated as they are rendered
  • AMP boilerplate is injected
  • critical styles are inlined
  • entry script is omitted

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've gotten numerous requests to have some sort of way to customize or process the template in Sapper. Might as well merge this for now as I'm assuming it will unblock you, but longer-term I'm wondering if we might be able to make AMP support utilize some sort of API that would solve the other use cases as well

packages/kit/src/api/dev/index.js Outdated Show resolved Hide resolved
@benmccann benmccann linked an issue Dec 15, 2020 that may be closed by this pull request
@Rich-Harris
Copy link
Member Author

Yeah, would need to study the use cases but I'm sure we can come up with something that does the job

@Rich-Harris Rich-Harris merged commit f5fa223 into master Dec 15, 2020
@Rich-Harris Rich-Harris deleted the gh-160 branch December 15, 2020 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AMP support
2 participants