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

Improved performance, Lighthouse audit #7

Open
renardsas opened this issue Mar 26, 2020 · 1 comment
Open

Improved performance, Lighthouse audit #7

renardsas opened this issue Mar 26, 2020 · 1 comment

Comments

@renardsas
Copy link

renardsas commented Mar 26, 2020

Hi,
I generated a report using Lighthouse for nuxt-prismic-showcase
Here result :
lighthouse-results

I generated another report for a site I did with nuxt and nuxt-prismic. I get close results:
lighthouse-site2-results

I set up lazy loading for images, cut to the right size, use next-gen formats, fix ensure test remains visible during webfont load by adding font-display: swap.

I read this article and set up vue-lazy-hydration to try to get better performance :
https://markus.oberlehner.net/blog/how-to-drastically-reduce-estimated-input-latency-and-time-to-interactive-of-ssr-vue-applications/

But this did not bring a significant drop.
What can be done to improve the result for Time to Interactive, First CPU Idle and Max Potential First Input Delay ?

Thank you

@rylanharper
Copy link

rylanharper commented Oct 15, 2020

@renardsas I know your comment has been here a while, but here are the things I do to get a perfect 100 PWA with Nuxt and Prismic:

  • Nuxt now supports static deployment. This can be done in your nuxt.config.js file by setting target:'static'. This will speed up performance more than anything.
  • As you mentioned, you'll want to ensure sure all images are lazyloaded or use a vue-hydration plugin. With Prismic, all images are automatically compressed with the support of imgix, which is cool. Personally, I use a custom vue-directive plugin that hooks up to Vanilla Lazyload, you can see my post here on that. I read your post, which is great!
  • Purge any additional css, especially if your using a sass library.
  • SEO can get a 100 with the Nuxt PWA plugin as well as filling in meta data in the nuxt.config file. You'll want to include the PWA options such as lang, name, short_name, and theme_color
  • Finally for Accessibility, you'll want to check lighthouse that your site is meeting the WCAG standards (basically no super small text, and clear color differentiation). Also make sure your images all have some type of alt text which can be done within Prismic when adding an image.

Hope this helps!:)

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

No branches or pull requests

2 participants