Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: svelte inspector updates and promote from experimental #631

Merged
merged 14 commits into from May 1, 2023

Conversation

dominikg
Copy link
Member

@dominikg dominikg commented Apr 23, 2023

We have received some Feedback for svelte-inspector and this PR aims to address most of it.

Adresses open issues and PRs:

fixes #434 by moving inspector ui outside of <body>
fixes #518 by automatically disabling inspector when user leaves the browser window after opening a file
fixes #551 by prepending configured base path to __openInEditor request
fixes #555 by changing default combo on linux to control-shift
fixes #559 by enabling holdMode by default

New Feature: Set options via environment.

# only set toggle
SVELTE_INSPECTOR_TOGGLE=control-shift

# or use complete config json
SVELTE_INSPECTOR_OPTIONS='{"holdMode": false}'

No longer experimental

Move your inspector config to the root of vitePlugin.

// svelte.config.js
export default {
  vitePlugin:{
    experimental:{
-      inspector: {...}
    },
+   inspector: {...}
  }
}

@dominikg
Copy link
Member Author

@delight sorry it took so long and i incorporated your PRs into this one as there was a fair bit of shifting around. I would love to get your review/feedback on this.

@dominikg
Copy link
Member Author

After discussing with svelte maintainers, inspector is not going to be enabled by default in vite-plugin-svelte as there can be situations where it is not useful and vite-plugin-svelte is a general purpose plugin.

It might be enabled by default in a future version of sveltekit though.

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trusting that you have tested this locally as I have not 😬 but the general changes LGTM.

@dominikg dominikg merged commit 40558dc into main May 1, 2023
7 checks passed
@dominikg dominikg deleted the feat/inspector-out-of-experimental branch May 1, 2023 09:22
@github-actions github-actions bot mentioned this pull request May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants