highliuk/vite
Composer 安装命令:
composer require highliuk/vite
包简介
Parse Vite.js manifest file easily and print tags in PHP to enjoy HMR
关键字:
README 文档
README
This library allows you to parse Vite.js manifest files easily and print tags in PHP to enjoy Hot Module Replacement (HMR).
Installation
Use composer to install the package:
composer require highliuk/vite
Usage
use HighLiuk\Vite\Vite; use HighLiuk\Vite\Manifest; $manifest = new Manifest('/path/to/dist/', '/url/to/dist/'); $vite = new Vite($manifest); // print the tags echo $vite->tags();
In this example, replace /path/to/dist with the path to your Vite.js dist directory and /url/to/dist with the URL to your Vite.js dist directory.
You can also specify the Vite host and port (defaults to http://localhost:5173/):
$vite = new Vite($manifest, 'http://localhost:port/');
Example
See the example directory for a full example.
License
This project is licensed under the MIT License - see the LICENSE file for details.
统计信息
- 总下载量: 1.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-09