网页速度分析及Webpack打包文件分析

使用Webpack Bundle Analyzer分析输出文件的大小,并用交互式可缩放树状图将其可视化展示。
使用PageSpeed Insights分析网页的内容,并获取如何提升网页加载速度的建议。

Webpack Bundle Analyzer

优化前:

优化后(对比参考video.js,其中moment使用cdn,element-ui按需加载(babel-plugin-component)且使用splitChunks进行切割)

Github地址 https://github.com/webpack-contrib/webpack-bundle-analyzer
Nuxt项目配置 https://zh.nuxtjs.org/guides/configuration-glossary/configuration-build/#analyze

PageSpeed Insights


通过访问 https://developers.google.cn/speed/pagespeed/insights/ ,在线分析网页

参考资料

https://segmentfault.com/a/1190000019355672?utm_source=tag-newest
https://blog.csdn.net/u014445517/article/details/103008998
https://www.cnblogs.com/jofun/p/13234973.html
https://www.imooc.com/wenda/detail/402094
https://www.toptal.com/developers/css/sprite-generator (雪碧图)


网页速度分析及Webpack打包文件分析
http://example.com/20201009-pagespeed/
作者
csorz
发布于
2020年10月9日
许可协议