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

SVG use-case in nuxt.js #36

Open
anton-karlovskiy opened this issue Feb 3, 2021 · 2 comments
Open

SVG use-case in nuxt.js #36

anton-karlovskiy opened this issue Feb 3, 2021 · 2 comments

Comments

@anton-karlovskiy
Copy link
Member

anton-karlovskiy commented Feb 3, 2021

@pi0 @danielroe cc @addyosmani

In this project, SVGs are inlined and duplicated whenever the same SVG is needed.
I think we should use https://github.com/nuxt-community/svg-module#vue-svg-loader.
What do you think?

I think we can compare the performance in the two cases where one is using manually inlined SVGs and the other one is using @nuxtjs/svg.
I guess that although the latter might increase the bundle size, it's super better for DX compared to the former.

@anton-karlovskiy
Copy link
Member Author

anton-karlovskiy commented Feb 4, 2021

TBT and TTI has regressed a little after switching from manually inlined SVGs to @nuxtjs/svg inlined SVGs

TBT and TTI regression

PR: #37
Lighthouse CI comparison: https://rocky-taiga-72405.herokuapp.com/app/projects/my-favorite-project/compare/9267bed5-2d11-4fc1-8b77-2910041b1557?compareUrl=http%3A%2F%2Flocalhost%3APORT%2F&baseBuild=bd5d1c1e-223c-47c0-a5fc-934b05e69d20

Before:
GitHub commit: 7daf317
Vercel URL: https://nuxt-movies-npkc4e0fn.vercel.app/

After:
GitHub commit: 045eb5d
Vercel URL: https://nuxt-movies-nw10lhsh3.vercel.app/

@pi0 @danielroe cc @addyosmani

@anton-karlovskiy
Copy link
Member Author

anton-karlovskiy commented Feb 4, 2021

I'm logging:
#37 (comment)
#37 (comment)

@addyosmani Could you please check @danielroe's suggestion about using sprites rather than inlined SVGs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant