> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kansolabs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating from the Vite plugin

> Moving from @kanso-labs/vite-plugin-style-dictionary.

This package was published as `@kanso-labs/vite-plugin-style-dictionary`, written directly as a Vite plugin. The unplugin rewrite changes three things for a Vite project, and nothing about how it behaves.

**1. Install the new package**

```bash theme={null}
npm uninstall @kanso-labs/vite-plugin-style-dictionary
npm install --save-dev @kanso-labs/unplugin-style-dictionary
```

**2. Import the Vite entry**

The root import is no longer a Vite plugin. Import `/vite`, which is a drop-in replacement for the old default export:

```ts vite.config.ts theme={null}
import StyleDictionary from '@kanso-labs/unplugin-style-dictionary/vite'
```

**3. Rename the options type**

`VitePluginStyleDictionaryOptions` is now `UnpluginStyleDictionaryOptions`, exported from every entry point:

```ts theme={null}
import type { UnpluginStyleDictionaryOptions } from '@kanso-labs/unplugin-style-dictionary/vite'
```

The options themselves, `config`, `watch` and `silent`, keep their shape.

Under Vite, compiling in `buildStart` and rebuilding under the dev server work as they did. The other targets are new: see [Bundlers](/style-dictionary/bundlers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.