{"id":26587,"library":"vite-plugin-dlight-client","title":"Vite plugin for DLight.js","description":"A Vite plugin that transpiles DLight.js component syntax (JSX-like DSL) into standard JavaScript, enabling fast HMR and bundling for DLight applications. Current stable version 0.9.20 is in active development with weekly releases. Key differentiator: seamlessly integrates DLight's reactive UI framework with Vite's fast dev server and optimized builds. Requires DLight runtime and Babel transforms.","status":"active","version":"0.9.20","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","dlight.js","vite-plugin","typescript"],"install":[{"cmd":"npm install vite-plugin-dlight-client","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-dlight-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-dlight-client","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core DLight runtime required for component rendering","package":"dlight","optional":false},{"reason":"used internally for transpilation","package":"@babel/core","optional":true}],"imports":[{"note":"ESM-only package; CJS require will fail. Use dynamic import if needed.","wrong":"const dlightPlugin = require('vite-plugin-dlight-client')","symbol":"default","correct":"import dlightPlugin from 'vite-plugin-dlight-client'"},{"note":"TypeScript users should use type import for options interface.","wrong":"","symbol":"type DlightOptions","correct":"import type { DlightOptions } from 'vite-plugin-dlight-client'"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite';\nimport dlightPlugin from 'vite-plugin-dlight-client';\n\nexport default defineConfig({\n  plugins: [\n    dlightPlugin({\n      // Optional: configure transpilation options\n      // files: 'src/**/*.js',\n      // parser: 'babel',\n    })\n  ]\n});","lang":"typescript","description":"Configure Vite with the DLight plugin for transpiling DLight components in your project."},"warnings":[{"fix":"Use ES import syntax or import() for dynamic import.","message":"ESM-only: package does not support CommonJS require()","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Replace 'files' with 'include: [\"src/**/*.js\"]' in plugin options.","message":"Option 'files' is deprecated; use 'include' and 'exclude' patterns instead.","severity":"deprecated","affected_versions":"0.8.0 - 0.9.0"},{"fix":"npm install dlight --save","message":"Missing peer dependency: dlight must be installed separately.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install vite-plugin-dlight-client --save-dev","cause":"Package not installed or incorrect import path.","error":"Error: Cannot find module 'vite-plugin-dlight-client'"},{"fix":"Use import dlightPlugin from 'vite-plugin-dlight-client' (default import).","cause":"Default import used incorrectly (e.g., named import instead of default).","error":"TypeError: dlightPlugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}