A Vite plugin that transpiles DLight.js source code (JSX-like syntax for reactive UIs built atop observable models) into standard JavaScript. As of v1.0.0, it integrates seamlessly with Vite's build pipeline, supporting both development and production modes. The plugin performs ahead-of-time compilation, eliminating runtime overhead from parsing DLight templates. It is the recommended way to build DLight applications with modern tooling, offering HMR during development and optimized output for production. No peer dependencies beyond Vite itself.
npm install vite-plugin-dlightNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to add the DLight Vite plugin to a Vite config and use it with a simple DLight component.
Always include the .dlight.ts extension in import paths for DLight files.
Ensure your DLight components have the .dlight extension (e.g., App.dlight.ts), or configure the 'files' option to match your naming convention.
Update imports: import { vitePluginDLight } from 'vite-plugin-dlight';Upgrade Vite to version 3 or higher.
Add 'experimentalDecorators': true and 'emitDecoratorMetadata': true under compilerOptions.
Use ES module import: import { vitePluginDLight } from 'vite-plugin-dlight';Ensure the file has the .dlight.ts extension and the plugin is properly configured in vite.config.ts.
Check the package documentation for the correct type name, or omit the type import if not needed.
Install the DLight runtime: npm install @dlightjs/dlight
No dependency data recorded yet.