定制 dnafactory/module-critical 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dnafactory/module-critical

最新稳定版本:1.0.4

Composer 安装命令:

composer require dnafactory/module-critical

包简介

A module that allows to serve the critical.css generated by less, directly from the static contents.

README 文档

README

License

A module that handles the critical css generation from less sources.

The elephant in the room

If you want to serve critical css as less sources, of course, you can put your critical.less in your custom theme directory.

app/design/frontend/[Vendor]/[Custom-Theme]/web/css/critical.less

And then, in the static:content:deploy phase, the critical.css file will be generated and saved in the static content folder. However, even in production mode, Magento will always try to fetch that file from the source directory, so it will re-build critical.css on each request.

Solution

This module simply replaces Magento's original ViewModel that reads the critical.css content, to fetch it from the static content folder instead.

Happy Coding

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-10-21