evo-mark / wp-vite
Installs: 288
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 1
Forks: 2
Open Issues: 0
Type:wordpress-plugin
Requires
Requires (Dev)
- symfony/var-dumper: ^6.2
README
WP Vite
Tags: wordpress, vite, esbuild, development, production, build Requires at least: 6.0 Tested up to: 6.7 Requires PHP: 8.2 License: MIT License URI: https://mit-license.org/
Bring Vite's lightning fast build process to your Wordpress theme or plugin
Usage
Inside your plugin entry file or function.php file (for themes) simply include the following:
use EvoMark\WpVite\WpVite;
$vite = new WpVite;
$vite->enqueue([
'namespace' => 'theme-vite',
'input' => ["src/main.js"],
]);
The enqueue function takes a single associative array as a parameter. Here are the properties it can contain:
Frontend
You will require the Wordpress Vite Plugin installed as part of your build process. See link for installation instructions
Frequently Asked Questions
-
Does this work with Gutenberg block development?
No. This plugin currently does not support usage in the development of block libraries. For that, we recommend Vite Plugin Gutenberg Blocks.