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).
4
4
5
5
## Usage
6
6
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
+
7
11
``` 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
+ };
22
18
```
23
19
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
+
24
24
## License
25
25
26
26
[ MIT] ( ./LICENSE )
You can’t perform that action at this time.
0 commit comments