bryaneschultz/vite-manifest-plugin
最新稳定版本:1.0.1
Composer 安装命令:
composer require bryaneschultz/vite-manifest-plugin
包简介
Twig utility function to handle Vite manifest asset files for Craft CMS.
README 文档
README
Requirements
This plugin requires Craft CMS 4.x or later.
Installation
1. Install with Composer
From the terminal
cd /path/to/project
composer require bryaneschultz/vite-manifest-plugin
2. Install through Craft CMS
In the Control Panel, go to Settings → Plugins → Vite Manifest → Install
Vite Manifest Overview
Lightweight Twig utility function to handle Vite Manifest files for Craft CMS.
Configuring Vite Manifest
Vite Manifest comes with basic configuration. To override these configuration keys,
copy the contents of the config.php file to config/vite-manifest.php
[
'webRootAlias' => '@webroot',
'manifestFile' => 'manifest.json',
'viteDist' => 'dist',
]
Using Vite Manifest
Basic Usage.
By default, Vite Manifest will use the version supplied by the manifest.
<link rel="stylesheet" href="{{ manifest('css/app.css') }}" />
<script src="{{ manifest('js/app.ts') }}"></script>
Advanced Usage.
If you want twig to handle the html for your asset, pass true as a second parameter.
{{ manifest('css/app.scss', true) }}
{{ manifest('js/app.ts', true) }}
License
Vite Manifest is open-sourced software licensed under the MIT license.
Vite Manifest Roadmap
Brought to you by Bryan E. Schultz
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-29