承接 pure_mashiro/magento2-bundlejs 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pure_mashiro/magento2-bundlejs

Composer 安装命令:

composer require pure_mashiro/magento2-bundlejs

包简介

Advanced JavaScript Bundling

README 文档

README

  • Delay rendering of non-important components on cacheable pages
  • Use bundles on non-cacheable pages.

Installation

composer require pure_mashiro/magento2-bundlejs

PageSpeed scores with Luma theme

Mobile Desktop

External links

Demo Video

Magento Marketplace

User Guide

My perspective

Magento 2 uses require JS to load JS when they are necessary. However, when the page just starts, it already needs to load almost 200 JS (or even more) files. In HTTP/1, it is a fatal weakness because the file needs to be downloaded one by one which greatly increase the loading time. However, with HTTP/2 enabled, this weakness of the Magento 2 front is covered and no longer a problem. Therefore, now, the core web vital of the Magento 2 luma theme is pretty decent. Except for the product detail page, it has a poor CLS. There is a git issue for it, which I hope will be merged into the develop branch in the future: magento/magento2#33265. The dev can always migrate the fix ahead as well.

Customized Magento 2 website still usually has a low google speed score compared to the Luma default. The score starts becoming low when we start using 3rd party JS and customize without taking CLS into account (Slider and other bad JS codes usually degrade CLS). The page tends to load JS first even though the image tag is before the JS which leads to the LCP vital will get degraded when using 3rd party JS.

Hyva theme will also have the same problem. The page speed score of the Hyva theme will become lower if the page uses 3rd party JS. The score in mobile can be reduced from 9x to 70 or 50 or even 30 depending on the number of 3rd party JS. Don't get me wrong. I don't say 70 or 50 is a bad result, it is good but it won't remain 9x score. They mention "Out of the box, Hyvä scores a 100/100 score in Google PageSpeed and it passes Core Web Vitals on all metrics". However, the Luma theme by default can also have a decent score 8x-9x/9x in Google PageSpeed (except for the product detail page because of the CLS issue).

Advanced bundle JS (not the native Magento bundle) is usually a solution for HTTP/1. However, with HTTP/2, I see that it is not necessary. With Luma default, with advanced bundle JS, the score will be even lower compared to when not using bundle. The problem is similar to with 3rd party JS. The page tends to load JS first but because the JS is now bundled, the file size got bigger and degraded LCP.

That is why, in my extension, it is recommended to use bundle only on non-cacheable pages. To further improve loading time, the extension has a feature to delay JS execution in which non-important components will be only rendered when the user starts interacting with the page.

pure_mashiro/magento2-bundlejs 适用场景与选型建议

pure_mashiro/magento2-bundlejs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.73k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2023 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 pure_mashiro/magento2-bundlejs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pure_mashiro/magento2-bundlejs 我们能提供哪些服务?
定制开发 / 二次开发

基于 pure_mashiro/magento2-bundlejs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.73k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 17
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2023-06-06