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
Description
I write a vite plugin and the plugin need implement a new custom shortcuts.
the plugin have a vite plugin hook like this:
When i start a dev server in a project with commod
vite,the CLI shortcuts bind twice。for example
press
h + enterwill print helper text twicepress
o + enterwill open browser twiceWhat 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