as-milano/wn-vitehelper-plugin
Composer 安装命令:
composer require as-milano/wn-vitehelper-plugin
包简介
Little helper (component) for using Vite as a builder in your themes.
README 文档
README
You can install plugin with Composer:
composer require "as-milano/wn-vitehelper-plugin"
How to use
Component
Add component viteAssets to your layout or another place.
{% component 'viteAssets' %}
You can split asset to two parts for better placement:
{% component 'viteAssets' render='css' %}
{% component 'viteAssets' render='js' %}
Configuration
There are few options for your .env file to configure development and building process:
VITE_ENTRY_FILE="js/index.js" # Entry file of your Vite project
VITE_THEME_PATH="/themes/milano" # Path to your active theme
VITE_PUPLIC_PATH="/src/public" # Path to "public" files, needed for dev mode
VITE_MANIFEST_DIR="assets/.vite" # Folder for manifest placement
VITE_ASSETS_DIR="assets" # Folder for assets
VITE_SERVE="auto" # Type of active serve mode detection. Can be: true | false | auto
VITE_SERVE_ADDRESS="http://host.docker.internal:5173" # Serve "external" address
VITE_SERVE_TIMEOUT=1 # Auto detection mode timeout
统计信息
- 总下载量: 102
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-23