Vite Plugin: Improve editor launching DX
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
Scenario:
- Windows 11 (not WSL)
- Vite build w/ Vue Dev Tools plugin
- Using Rider for backend development
- Using WebStorm for frontend development
Configuration:
vueDevTools({
launchEditor: 'webstorm',
}),
We have been having issues with the above setup across our developers. Having tracked through the code in both this repository and the launch-editor dependency I can identify a few issues. I think most are likely in the dependency, but wanted to start at the top of the chain:
Error messaging is not clear enough
Could not open [path] in the editor
The editor process exited with an error: (Err code 1)
This is what I was seeing in the console window. It would be really useful here to identify what exactly is being executed, the full CLI that is being executed. That would allow copy-pasting to run directly to immediately see the issue (in this case, webstorm did not exist).
Auto-find is not possible
We have two options in the dev tools configuration. Leave the launchEditor option undefined, in which case code is always chosen, or set an editor (to one of the "known" names or the full string to exe).
launch-editor has the ability to automatically find running editors, not this is not possible when used as part of the dev tools.
Auto-find lacks ability to specify a preference
Auto find can find running editors, but in our case we run both Rider and WebStorm. Because Rider is first alphabetically it will always pick that one, not our preference, WebStorm.
It would be great if we could add a preference order in the short-hand option version, but it still auto-finds the path. WebStorm, particularly when using EAP versions, does not automatically create alias webstorm, which is why we had the failure in the first place. Keeping up with versions and batch alias is error-prone.
If instead we could configure webstorm but the editor launch still tried to find the correct path by looking at running processes we can have the best of both worlds. Automatically finding the correct exe AND being able to specify which one to actually prefer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Vue Dev Tools configuration handling for launchEditor, then trace how it invokes the launch-editor dependency on Windows. Done means error output includes the full command, auto-detection can honor a preferred editor, and the configured editor can resolve its running executable; verify the behavior with the existing project checks or a Windows reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100