MCPcopy
hub / github.com/vitejs/vite / configureServer

Function configureServer

packages/vite/src/node/__tests__/shortcuts.spec.ts:79–100  ·  view source on GitHub ↗
(viteDevServer)

Source from the content-addressed store, hash-verified

77 {
78 name: 'custom-shortcut-plugin',
79 configureServer(viteDevServer) {
80 const action = vi.fn()
81
82 // Keep track of actions created by the plugin
83 // To verify if they are overwritten on server restart
84 pluginShortcutActions.push(action)
85
86 // Bind custom shortcut from plugin
87 bindCLIShortcuts(
88 viteDevServer,
89 {
90 customShortcuts: [
91 {
92 key: 'y',
93 description: 'plugin shortcut',
94 action,
95 },
96 ],
97 },
98 true,
99 )
100 },
101 },
102 ],
103 })

Callers

nothing calls this directly

Calls 1

bindCLIShortcutsFunction · 0.90

Tested by

no test coverage detected