{"id":26590,"library":"vite-plugin-dlight-transpiler","title":"Vite Plugin DLight Transpiler","description":"A Vite plugin that transpiles DLight.js components at build time. Current stable version: 0.6.1. This plugin is a core part of the DLight.js ecosystem, providing the necessary compilation step for DLight's JSX-like syntax. It integrates with Vite's build pipeline to transform .dlight files into JavaScript. Release cadence is sporadic, tied to DLight.js updates. Key differentiator: it enables the use of DLight.js with Vite, which is faster and more modern than webpack-based alternatives.","status":"active","version":"0.6.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","vite-plugin","dlight.js","typescript"],"install":[{"cmd":"npm install vite-plugin-dlight-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-dlight-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-dlight-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: required to function as a Vite plugin.","package":"vite","optional":false}],"imports":[{"note":"The package exports a default function, not a named export. Use default import.","wrong":"import { dlightTranspiler } from 'vite-plugin-dlight-transpiler'","symbol":"default","correct":"import dlightTranspiler from 'vite-plugin-dlight-transpiler'"},{"note":"CommonJS require returns the default export directly. Destructuring will result in undefined.","wrong":"const { dlightTranspiler } = require('vite-plugin-dlight-transpiler')","symbol":"dlightTranspiler","correct":"const dlightTranspiler = require('vite-plugin-dlight-transpiler')"},{"note":"TypeScript users can import the options type for type safety. Not available in JavaScript.","wrong":"","symbol":"DLightTranspilerOptions","correct":"import type { DLightTranspilerOptions } from 'vite-plugin-dlight-transpiler'"}],"quickstart":{"code":"// vite.config.js\nimport { defineConfig } from 'vite'\nimport dlightTranspiler from 'vite-plugin-dlight-transpiler'\n\nexport default defineConfig({\n  plugins: [dlightTranspiler()]\n})","lang":"javascript","description":"Shows how to add the DLight transpiler plugin to a Vite configuration file (vite.config.js)."},"warnings":[{"fix":"Update import to default import: import dlightTranspiler from 'vite-plugin-dlight-transpiler'","message":"Version 0.5.0 changed the plugin API from named export to default export. Old imports will break.","severity":"breaking","affected_versions":"<0.5.0"},{"fix":"Use new options shape: { include: string[], exclude: string[], ... }","message":"The options argument signature changed in v0.6.0. Old options format will log a deprecation warning.","severity":"deprecated","affected_versions":">=0.6.0 <0.6.1"},{"fix":"Add the plugin as the first element in the plugins array.","message":"The plugin must be placed before other transform plugins in the Vite plugin array to ensure source files are transpiled first.","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":"Run: npm install vite-plugin-dlight-transpiler","cause":"Missing npm install of the package.","error":"Error: Cannot find module 'vite-plugin-dlight-transpiler'"},{"fix":"Change import statement to: import dlightTranspiler from 'vite-plugin-dlight-transpiler'","cause":"Using named import instead of default import.","error":"TypeError: dlightTranspiler is not a function"},{"fix":"Check the available options (include, exclude) and correct the configuration.","cause":"Passing an unsupported option in the plugin config.","error":"Error: Plugin dlight-transpiler: unknown option 'foo'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}