@@ -46,7 +46,7 @@ yarn add -D @hvniel/vite-plugin-svelte-inline-component
4646``` ts
4747import { defineConfig } from " vite" ;
4848import { sveltekit } from " @sveltejs/kit/vite" ;
49- import { inlineSveltePlugin } from " @hvniel/vite-plugin-svelte-inline-component" ;
49+ import inlineSveltePlugin from " @hvniel/vite-plugin-svelte-inline-component/plugin " ;
5050
5151export default defineConfig (({ mode }) => ({
5252 plugins: [mode === " test" && inlineSveltePlugin (), sveltekit ()],
@@ -79,6 +79,7 @@ Just like regular Svelte files, you can use `<script context="module">` (or `<sc
7979The plugin makes any named exports available as properties on the component itself.
8080
8181``` tsx
82+ import { html , type InlineSnippet } from " @hvniel/vite-plugin-svelte-inline-component" ;
8283const ComponentWithSnippets = html `
8384 <script lang="ts" module>
8485 // These snippets will be attached to the component export
@@ -112,8 +113,7 @@ const renderer = render(anchor => {
112113To make TypeScript aware of your named exports, you'll need to use a type assertion.
113114
114115``` ts
115- import type { InlineSnippet } from " @hvniel/vite-plugin-svelte-inline-component" ;
116-
116+ import { html , type InlineSnippet } from " @hvniel/vite-plugin-svelte-inline-component" ;
117117const defaultExport = html `
118118 <script module>
119119 export { element };
@@ -142,6 +142,7 @@ Here’s a sample test that proves reactivity with **Svelte 5 runes** works out
142142
143143``` tsx
144144import { render } from " vitest-browser-svelte" ;
145+ import { html , type InlineSnippet } from " @hvniel/vite-plugin-svelte-inline-component" ;
145146
146147it (" supports reactive components" , async () => {
147148 const ReactiveComponent = html `
0 commit comments