We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c18b169 commit 482b5b6Copy full SHA for 482b5b6
packages/vite-plugin-mcp/src/index.ts
@@ -36,7 +36,7 @@ export function ViteMcp(options: ViteMcpOptions = {}): Plugin {
36
if (cursorMcpOptions.enabled) {
37
if (existsSync(join(root, '.cursor'))) {
38
const mcp = existsSync(join(root, '.cursor/mcp.json'))
39
- ? JSON.parse(await fs.readFile(join(root, '.cursor/mcp.json'), 'utf-8'))
+ ? JSON.parse(await fs.readFile(join(root, '.cursor/mcp.json'), 'utf-8') || '{}')
40
: {}
41
mcp.mcpServers ||= {}
42
mcp.mcpServers[cursorMcpOptions.serverName || 'vite'] = { url: sseUrl }
0 commit comments