{"id":22861,"library":"vite-plugin-svelte-kebab-props","title":"Vite Plugin Svelte Kebab Props","description":"Vite 2.x plugin that enables using kebab-case (hyphenated) attribute names for Svelte component props, automatically mapping them to camelCase component variables. Version 1.0.3 is current, with no active development observed. Works as a Vite plugin for SvelteKit or Svelte projects using Vite. Differentiates by eliminating the need to manually write camelCase props in templates, allowing HTML-conventional kebab-case while leveraging Svelte's reactivity.","status":"active","version":"1.0.3","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/roonie007/vite-plugin-svelte-kebab-props","tags":["javascript","svelte","vite","kebab","case","kebab-case","dash","hyphen"],"install":[{"cmd":"npm install vite-plugin-svelte-kebab-props","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-svelte-kebab-props","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-svelte-kebab-props","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency - transforms Svelte components","package":"svelte","optional":false},{"reason":"peer dependency - Vite plugin","package":"vite","optional":false}],"imports":[{"note":"Package exports a default function, not a named export.","wrong":"import { svelteKebabProps } from 'vite-plugin-svelte-kebab-props'","symbol":"default","correct":"import svelteKebabProps from 'vite-plugin-svelte-kebab-props'"},{"note":"CommonJS require returns the default export, not a named object.","wrong":"const { svelteKebabProps } = require('vite-plugin-svelte-kebab-props')","symbol":"svelteKebabProps","correct":"const svelteKebabProps = require('vite-plugin-svelte-kebab-props')"},{"note":"No TypeScript types are provided; the default export is a function, so you can name it anything.","wrong":"import VitePluginSvelteKebabProps from 'vite-plugin-svelte-kebab-props'","symbol":"VitePluginSvelteKebabProps","correct":"import svelteKebabProps from 'vite-plugin-svelte-kebab-props'"}],"quickstart":{"code":"// vite.config.js or svelte.config.cjs\nimport svelteKebabProps from 'vite-plugin-svelte-kebab-props';\n\nexport default {\n  plugins: [svelteKebabProps()]\n};","lang":"javascript","description":"Shows how to add the plugin to a Vite configuration file, enabling kebab-case props in Svelte components."},"warnings":[{"fix":"Check compatibility with your Vite version; consider an alternative if using Vite 3+.","message":"Plugin only supports Vite 2.x; it may not work with Vite 3+ or SvelteKit 1.0+ without modifications.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Ensure all kebab-case props are explicitly exported as `let` variables.","message":"Only transforms props that are declared with `export let` in Svelte components; does not handle spread props or dynamic attribute binding.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Order plugins carefully; put svelteKebabProps before other template transformers.","message":"May conflict with other preprocessors that also transform templates, like svelte-preprocess.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Evaluate if needed; replicate functionality with a custom preprocessor if issues arise.","message":"Package hasn't been updated since initial release; consider it unmaintained.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev vite-plugin-svelte-kebab-props or equivalent.","cause":"Package not installed.","error":"Error: Cannot find module 'vite-plugin-svelte-kebab-props'"},{"fix":"Use `import svelteKebabProps from 'vite-plugin-svelte-kebab-props'`.","cause":"Using named import instead of default import.","error":"TypeError: svelteKebabProps is not a function"},{"fix":"Downgrade to Vite 2.x or find an alternative plugin.","cause":"Plugin is only for Vite 2.x.","error":"Vite build error: Plugin 'vite-plugin-svelte-kebab-props' not supported in Vite 3+"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}