From 83d993b9cab6f261bdc3d3f65352733cc2db9bfa Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 13 Oct 2024 08:10:52 -0700 Subject: [PATCH] docs: make inspector docs more scannable --- docs/inspector.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/inspector.md b/docs/inspector.md index a3251e541..3bb8c8a7d 100644 --- a/docs/inspector.md +++ b/docs/inspector.md @@ -6,13 +6,23 @@ Note that `@sveltejs/vite-plugin-svelte` needs to be installed as a peer depende ## Setup -### with Svelte config +### enable in Svelte config + +```js +// svelte.config.js +export default { + vitePlugin: { + inspector: true + } +}; +``` + +### enable with custom options in Svelte config ```js // svelte.config.js export default { vitePlugin: { - // set to true for defaults or customize with object inspector: { toggleKeyCombo: 'meta-shift', showToggleButton: 'always', @@ -22,7 +32,7 @@ export default { }; ``` -### with environment variables +### configure with environment variables Svelte Inspector toggle keys and other options are personal preferences. As such it isn't always convenient to define them in a shared svelte config file. To allow you to use your own setup, svelte inspector can be configured via environment variables, both from shell and dotenv files.