Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Pwa audit/add meta description to routes #158

Conversation

mellisdesigns
Copy link

@mellisdesigns mellisdesigns commented Jul 1, 2019

Summary
Add meta descriptions to all routes in the generated sample template based off Lighthouse Audit recommendations.

Audit Trail
After
image

Before
image

@mellisdesigns
Copy link
Author

Excuse the name of the branch, this is not a pws specific change. As part of this PR I can also change a few other items that the audit picked up. Thoughts?

@evdama
Copy link

evdama commented Jul 1, 2019

that's the issue that goes along with this sveltejs/svelte#1607

@evdama
Copy link

evdama commented Jul 6, 2019

something odd is going on, based of the template, when I apply this patch, then npm install and npm run build and npm run dev it renders fine but just for the initial load.

After that, clicking between the items inside Nav doesn't show the route contents anymore e.g. try clicking 'about' or 'blog' and back to 'home'. Nothing is rendered.

I tested on current Chrome within incognito window just to make sure no extension etc. is going to trick something but didn't change the result. Same in normal window of course.

@matyunya
Copy link

matyunya commented Jul 6, 2019

Adding meta to <svelte:head> breaks page transitions for me.

@evdama
Copy link

evdama commented Jul 6, 2019

yup, it does, so it's verified

here's the console error log

chunk.70861921.js:52 Uncaught (in promise) TypeError: Cannot read property 'removeChild' of null
    at detach (chunk.70861921.js:52)
    at Object.destroy [as d] (index.7c71542e.js:123)
    at destroy_component (chunk.70861921.js:272)
    at client.78f318a7.js:623
    at chunk.70861921.js:209
    at run (chunk.70861921.js:14)
    at Array.forEach (<anonymous>)
    at run_all (chunk.70861921.js:20)
    at check_outros (chunk.70861921.js:191)
    at Object.update [as p] (client.78f318a7.js:625)

going down the rabbit hole it seems it doesn't have a parent node because it explodes at

function detach(node) {
    node.parentNode.removeChild(node);
}

@Conduitry
Copy link
Member

See sveltejs/svelte#3187 (comment) - I believe this is a bug that needs to be fixed in Svelte, not worked around in Sapper.

@benmccann
Copy link
Member

It looks like it was fixed in Svelte 3.6.7

@benmccann
Copy link
Member

I'm going to close this since we're now on a newer version of Svelte

@benmccann benmccann closed this Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants