{"repo":"roots/vite-plugin","free":true,"listed":false,"github":"https://github.com/roots/vite-plugin","clone":"git clone https://github.com/roots/vite-plugin.git","description":"A Vite plugin for working with WordPress","language":"TypeScript","stars":58,"topics":["acorn","sage","vite","vite-plugin","wordpress"],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"Vite Plugin for WordPress Here lives a Vite plugin for WordPress development. Support us Roots is an independent open source org, supported only by developers like you. Your sponsorship funds WP Packages and the entire Roots ecosystem, and keeps them independent. Support us by purchasing Radicle or sponsoring us on GitHub — sponsors get access to our private Discord. Features - 🔄 Transforms @wordpress/ imports into global wp. references - 📦 Generates dependency manifest for WordPress enqueuing - 🎨 Generates theme.json from Tailwind CSS configuration (colors, fonts, font sizes, border radius) - 🔥 Hot Module Replacement (HMR) support for the WordPress editor Installation Usage Start by adding the base plugin to your Vite config: Once you've added the plugin, WordPress dependencies referenced in your code will be transformed into global wp. references. When WordPress dependencies are transformed, a manifest containing the required dependencies will be generated called editor.deps.json . External Mappings for Third-Party Plugins The plugin can also handle third-party WordPress plugins that expose global JavaScript APIs, such as Advanced Custom Fields (ACF) or WooCommerce. This allows you to import these dependencies in your code while ensuring they're treated as external dependencies and properly enqueued by WordPress. With this configuration, you can import from these packages in your code: The plugin will transform these imports into global references: The handle value is a","default_branch":null,"files":null,"tree":[],"storefront":"/r/roots","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/roots/vite-plugin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}