{"id":26589,"library":"vite-plugin-dlight-server","title":"Vite Plugin DLight Server","description":"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.","status":"active","version":"0.9.21","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","dlight.js","vite-plugin","typescript"],"install":[{"cmd":"npm install vite-plugin-dlight-server","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-dlight-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-dlight-server","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: required to function as a Vite plugin","package":"vite","optional":false},{"reason":"runtime dependency: provides core DLight functionality","package":"@dl-light/dlight","optional":false}],"imports":[{"note":"ESM-only; CommonJS require is not supported.","wrong":"const vitePluginDLightServer = require('vite-plugin-dlight-server')","symbol":"default (plugin function)","correct":"import vitePluginDLightServer from 'vite-plugin-dlight-server'"},{"note":"Also available as a named export to match common naming conventions.","wrong":"import VitePluginDLightServer from 'vite-plugin-dlight-server'","symbol":"vitePluginDLightServer (named export)","correct":"import { vitePluginDLightServer } from 'vite-plugin-dlight-server'"},{"note":"TypeScript type import for plugin configuration.","wrong":"","symbol":"VitePluginConfig (type)","correct":"import type { VitePluginConfig } from 'vite-plugin-dlight-server'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport vitePluginDLightServer from 'vite-plugin-dlight-server';\nimport dlight from '@dl-light/dlight';\n\nexport default defineConfig({\n  plugins: [\n    vitePluginDLightServer(),\n    dlight()\n  ]\n});","lang":"typescript","description":"Shows how to add the DLight server plugin and client plugin to a Vite config."},"warnings":[{"fix":"Upgrade to Vite 4 or 5.","message":"Requires Vite 4+; incompatible with Vite 3.x.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Update to Node 16 or higher.","message":"Dropped support for Node.js 14; now requires Node 16+.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Reorder plugins: vitePluginDLightServer() first, then dlight().","message":"The plugin must be placed before @dl-light/dlight in the plugins array.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Replace server: true with ssr: true in plugin options.","message":"The 'server' option is deprecated; use 'ssr' option instead.","severity":"deprecated","affected_versions":">=0.8.0 <0.9.0"}],"env_vars":null,"search_vec":"'/dlight':69 '0.9.21':34 'base':28 'build':43 'client':64 'client-sid':63 'compil':48 'complement':61 'compon':21 'current':30 'differenti':52 'dl':67 'dl-light':66 'dlight':3,20,46,60 'dlight.js':9,72 'enabl':19 'handl':45 'hmr':50 'integr':38 'javascript':71 'jsx':11 'jsx-like':10 'key':51 'light':68 'like':12 'pipelin':44 'plugin':2,6,70,75 'project':29 'provid':53 'releas':37 'render':18,57 'seamless':39 'server':4,16,55 'server-sid':15,54 'side':17,56,65 'stabl':31 'support':58 'syntax':13 'templat':47 'transpil':8 'typescript':76 'use':24 'version':32 'vite':1,5,27,41,74 'vite-bas':26 'vite-plugin':73 'week':36","created_at":"2026-05-01T13:50:45.666812+00:00","updated_at":"2026-05-01T13:50:45.666812+00:00","problems":[{"fix":"Upgrade Vite: npm install vite@latest","cause":"Project uses Vite 3 which is incompatible with plugin version 0.9.0+.","error":"Error: The plugin 'vite-plugin-dlight-server' requires Vite 4 or higher."},{"fix":"Use ES6 import: import vitePluginDLightServer from 'vite-plugin-dlight-server'","cause":"Importing the plugin incorrectly due to ESM/CJS mismatch.","error":"TypeError: vitePluginDLightServer is not a function"},{"fix":"Install the package: npm install @dl-light/dlight","cause":"Missing dependency @dl-light/dlight which is required at runtime.","error":"Error: Cannot find module '@dl-light/dlight'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vite-plugin-dlight-server","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}