File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed
packages/vite-plugin-svelte-inspector Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @sveltejs/vite-plugin-svelte-inspector ' : patch
3+ ---
4+
5+ docs: update usage instructions in readme and link to docs
Original file line number Diff line number Diff line change @@ -4,23 +4,23 @@ A [Svelte](https://svelte.dev) inspector plugin for [Vite](https://vitejs.dev).
44
55## Usage
66
7+ This plugin is automatically installed as a dependency of [ @sveltejs/vite-plugin-svelte ] ( https://www.npmjs.com/package/@sveltejs/vite-plugin-svelte ) .
8+
9+ You can enable it in ` svelte.config.js ` by adding the ` vitePlugin.inspector ` option.
10+
711``` js
8- // vite.config.js
9- import { defineConfig } from ' vite' ;
10- import { svelte } from ' @sveltejs/vite-plugin-svelte' ;
11- import { svelteInspector } from ' @sveltejs/vite-plugin-svelte-inspector' ;
12-
13- export default defineConfig ({
14- plugins: [
15- // the svelte plugin is required to work
16- svelte (),
17- svelteInspector ({
18- /* plugin options */
19- })
20- ]
21- });
12+ // svelte.config.js
13+ export default {
14+ vitePlugin: {
15+ inspector: true
16+ }
17+ };
2218```
2319
20+ Now simply press ` alt-x ` on a page served by the vite devserver to activate inspect mode and click to open the file in your editor.
21+
22+ Also check out the [ docs] ( https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/inspector.md ) for customization options.
23+
2424## License
2525
2626[ MIT] ( ./LICENSE )
You can’t perform that action at this time.
0 commit comments