{"library":"vite-plugin-drupal-twig-hmr","type":"library","category":null,"description":"A Vite plugin that enables Hot Module Replacement (HMR) for Drupal Twig templates and Single-Directory Components. Current stable version is 1.0.1, released on a low cadence. It uses Vite's HMR API and Drupal's Twig debug mode to fetch updated HTML and perform DOM replacements when a .twig file changes. Limited to theme suggestions and does not support TypeScript or automated testing. Differentiates from other Drupal build tools by providing instant template reloads without full page refresh, but requires a compatible Vite-Drupal setup (e.g., via the Vite module) and a virtual module script injected into the backend.","language":"javascript","status":"active","version":"1.0.1","tags":["javascript","vite-plugin","drupal","hmr"],"last_verified":"Mon Apr 27","install":[{"cmd":"npm install vite-plugin-drupal-twig-hmr","imports":["import viteDrupalTwigHMR from 'vite-plugin-drupal-twig-hmr'","import type { PluginOptions } from 'vite-plugin-drupal-twig-hmr'","// In your Drupal template: <script src=\"localhost:5173/@vite-plugin-drupal-template-hmr\" type=\"module\"></script>"]},{"cmd":"yarn add vite-plugin-drupal-twig-hmr","imports":[]},{"cmd":"pnpm add vite-plugin-drupal-twig-hmr","imports":[]}],"homepage":null,"github":"https://github.com/yannickoo/vite-plugin-drupal-twig-hmr","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vite-plugin-drupal-twig-hmr","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}