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

vite-plugin-dlight-server

JSON →
library0.9.21jsnpmunverified

Vite plugin that transpiles DLight.js JSX-like syntax for server-side rendering, enabling DLight components to be used in Vite-based projects. Current stable version is 0.9.21, with weekly releases. Integrates seamlessly with Vite's build pipeline, handling DLight template compilation and HMR. Key differentiator: provides server-side rendering support for DLight, complementing the client-side @dl-light/dlight plugin.

npm install vite-plugin-dlight-server
INSTALL
IMPORT
SIG · VITE-PLUGIN-DLIGHT
V
vite-plugin-dlight-server
web-frameworkjavascriptv0.9.21
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 (plugin function)
import vitePluginDLightServer from 'vite-plugin-dlight-server'
const vitePluginDLightServer = require('vite-plugin-dlight-server')
ESM-only; CommonJS require is not supported.
vitePluginDLightServer (named export)
import { vitePluginDLightServer } from 'vite-plugin-dlight-server'
import VitePluginDLightServer from 'vite-plugin-dlight-server'
Also available as a named export to match common naming conventions.
VitePluginConfig (type)
import type { VitePluginConfig } from 'vite-plugin-dlight-server'
TypeScript type import for plugin configuration.

Shows how to add the DLight server plugin and client plugin to a Vite config.

import { defineConfig } from 'vite'; import vitePluginDLightServer from 'vite-plugin-dlight-server'; import dlight from '@dl-light/dlight'; export default defineConfig({ plugins: [ vitePluginDLightServer(), dlight() ] });
Debug
Known issues
breakingRequires Vite 4+; incompatible with Vite 3.x.
fix
Upgrade to Vite 4 or 5.
affects: >=0.9.0
breakingDropped support for Node.js 14; now requires Node 16+.
fix
Update to Node 16 or higher.
affects: >=0.9.0
gotchaThe plugin must be placed before @dl-light/dlight in the plugins array.
fix
Reorder plugins: vitePluginDLightServer() first, then dlight().
affects: >=0.0.1
deprecatedThe 'server' option is deprecated; use 'ssr' option instead.
fix
Replace server: true with ssr: true in plugin options.
affects: >=0.8.0 <0.9.0
Errors
Common errors & fixes
Error: The plugin 'vite-plugin-dlight-server' requires Vite 4 or higher.
Project uses Vite 3 which is incompatible with plugin version 0.9.0+.
fix
Upgrade Vite: npm install vite@latest
TypeError: vitePluginDLightServer is not a function
Importing the plugin incorrectly due to ESM/CJS mismatch.
fix
Use ES6 import: import vitePluginDLightServer from 'vite-plugin-dlight-server'
Error: Cannot find module '@dl-light/dlight'
Missing dependency @dl-light/dlight which is required at runtime.
fix
Install the package: npm install @dl-light/dlight
Upgrade
Version history
0.9.21latest on npm
Audit
Dependencies
viterequiredpeer dependency: required to function as a Vite plugin
@dl-light/dlightrequiredruntime dependency: provides core DLight functionality
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
vite-plugin-dlight-server — npm install vite-plugin-dlight-server · libregistry