uvue
uvue copied to clipboard
AMP
trafficstars
Is your feature request related to a problem? Please describe.
I want to use uVue to create routes for amp.dev. Is there any ready-to-use guides on how to make it possible?
Describe the solution you'd like
A plugin? A guide? A StackOverflow answer?
Describe alternatives you've considered
It's easy to start as I see:
- Create new route, for example,
'/article/:id/amp' - Duplicate component from original route and remove all runtime code
- Link to AMP route from original route using vue-meta, like this:
<link rel="amphtml" href="https://www.example.com/article/<id>/amp">(and the same for AMP to original) - Remove Vue JS bundles from this route
- How about router? It's now handled by AMP?
for now, I just modify response.body on rendered(response, context, app) hook with PostHTML
https://gist.github.com/Grawl/ee90f967e7104142cc36516c7026ea39