-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Closed
Copy link
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Description
I write a vite plugin and the plugin need implement a new custom shortcuts.
the plugin have a vite plugin hook like this:
configureServer(server) {
devServer = server
devServer.bindCLIShortcuts({
print: true,
customShortcuts: [{
key: 'p',
description: 'xxxx',
action(server) {
console.log('test')
}
}]
})
}When i start a dev server in a project with commod vite,the CLI shortcuts bind twice。
for example
press h + enter will print helper text twice
press o + enter will open browser twice
What is the correct way to implement my plugin?###
Suggested solution
Add a new option in bindCLIShortcuts function to disable default shortcuts.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)