bryaneschultz/vite-manifest-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

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

Screenshot

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 SettingsPluginsVite ManifestInstall

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
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-29