Registry / web-framework / vite-plugin-svelte-kebab-props

vite-plugin-svelte-kebab-props

JSON →
library1.0.3jsnpmunverified

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.

npm install vite-plugin-svelte-kebab-props
INSTALL
IMPORT
SIG · VITE-PLUGIN-SVELTE
V
vite-plugin-svelte-kebab-props
web-frameworkjavascriptv1.0.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

default
import svelteKebabProps from 'vite-plugin-svelte-kebab-props'
import { svelteKebabProps } from 'vite-plugin-svelte-kebab-props'
Package exports a default function, not a named export.
svelteKebabProps
const svelteKebabProps = require('vite-plugin-svelte-kebab-props')
const { svelteKebabProps } = require('vite-plugin-svelte-kebab-props')
CommonJS require returns the default export, not a named object.
VitePluginSvelteKebabProps
import svelteKebabProps from 'vite-plugin-svelte-kebab-props'
import VitePluginSvelteKebabProps from 'vite-plugin-svelte-kebab-props'
No TypeScript types are provided; the default export is a function, so you can name it anything.

Shows how to add the plugin to a Vite configuration file, enabling kebab-case props in Svelte components.

// vite.config.js or svelte.config.cjs import svelteKebabProps from 'vite-plugin-svelte-kebab-props'; export default { plugins: [svelteKebabProps()] };
Debug
Known issues
breakingPlugin only supports Vite 2.x; it may not work with Vite 3+ or SvelteKit 1.0+ without modifications.
fix
Check compatibility with your Vite version; consider an alternative if using Vite 3+.
affects: >=1.0.0
gotchaOnly transforms props that are declared with `export let` in Svelte components; does not handle spread props or dynamic attribute binding.
fix
Ensure all kebab-case props are explicitly exported as `let` variables.
affects: >=1.0.0
gotchaMay conflict with other preprocessors that also transform templates, like svelte-preprocess.
fix
Order plugins carefully; put svelteKebabProps before other template transformers.
affects: >=1.0.0
deprecatedPackage hasn't been updated since initial release; consider it unmaintained.
fix
Evaluate if needed; replicate functionality with a custom preprocessor if issues arise.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'vite-plugin-svelte-kebab-props'
Package not installed.
fix
Run npm install --save-dev vite-plugin-svelte-kebab-props or equivalent.
TypeError: svelteKebabProps is not a function
Using named import instead of default import.
fix
Use `import svelteKebabProps from 'vite-plugin-svelte-kebab-props'`.
Vite build error: Plugin 'vite-plugin-svelte-kebab-props' not supported in Vite 3+
Plugin is only for Vite 2.x.
fix
Downgrade to Vite 2.x or find an alternative plugin.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies
svelterequiredpeer dependency - transforms Svelte components
viterequiredpeer dependency - Vite plugin
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
vite-plugin-svelte-kebab-props — npm install vite-plugin-svelte-kebab-props · libregistry