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
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
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2021-10-21