Registry / web-framework / vite-plugin-dlight-transpiler

vite-plugin-dlight-transpiler

JSON →
library0.6.1jsnpmunverified

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.

npm install vite-plugin-dlight-transpiler
INSTALL
IMPORT
SIG · VITE-PLUGIN-DLIGHT
V
vite-plugin-dlight-transpiler
web-frameworkjavascriptv0.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import dlightTranspiler from 'vite-plugin-dlight-transpiler'
✗ import { dlightTranspiler } from 'vite-plugin-dlight-transpiler'
The package exports a default function, not a named export. Use default import.
dlightTranspiler
✓ const dlightTranspiler = require('vite-plugin-dlight-transpiler')
✗ const { dlightTranspiler } = require('vite-plugin-dlight-transpiler')
CommonJS require returns the default export directly. Destructuring will result in undefined.
DLightTranspilerOptions
✓ import type { DLightTranspilerOptions } from 'vite-plugin-dlight-transpiler'
TypeScript users can import the options type for type safety. Not available in JavaScript.

Shows how to add the DLight transpiler plugin to a Vite configuration file (vite.config.js).

// vite.config.js import { defineConfig } from 'vite' import dlightTranspiler from 'vite-plugin-dlight-transpiler' export default defineConfig({ plugins: [dlightTranspiler()] })
Debug
Known issues
breakingVersion 0.5.0 changed the plugin API from named export to default export. Old imports will break.
fix
Update import to default import: import dlightTranspiler from 'vite-plugin-dlight-transpiler'
affects: <0.5.0
deprecatedThe options argument signature changed in v0.6.0. Old options format will log a deprecation warning.
fix
Use new options shape: { include: string[], exclude: string[], ... }
affects: >=0.6.0 <0.6.1
gotchaThe plugin must be placed before other transform plugins in the Vite plugin array to ensure source files are transpiled first.
fix
Add the plugin as the first element in the plugins array.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'vite-plugin-dlight-transpiler'
Missing npm install of the package.
fix
Run: npm install vite-plugin-dlight-transpiler
TypeError: dlightTranspiler is not a function
Using named import instead of default import.
fix
Change import statement to: import dlightTranspiler from 'vite-plugin-dlight-transpiler'
Error: Plugin dlight-transpiler: unknown option 'foo'
Passing an unsupported option in the plugin config.
fix
Check the available options (include, exclude) and correct the configuration.
Upgrade
Version history
0.6.1latest on npm
Audit
Dependencies
viterequiredPeer dependency: required to function as a Vite plugin.
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
vite-plugin-dlight-transpiler — npm install vite-plugin-dlight-transpiler · libregistry