Skip to content

Commit

Permalink
fix(vscode): should pass entry file name to CLI (#1677)
Browse files Browse the repository at this point in the history
Co-authored-by: ras0q <ras0q@users.noreply.github.com>
Co-authored-by: _Kerman <kermanx@qq.com>
  • Loading branch information
3 people committed Jun 17, 2024
1 parent b38d094 commit 1142d83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vscode/src/composables/useDevServer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { basename } from 'node:path'
import type { Ref } from '@vue/runtime-core'
import { toRef } from '@vue/runtime-core'
import { getPort as getPortPlease } from 'get-port-please'
Expand Down Expand Up @@ -28,7 +29,7 @@ export function useDevServer(project: SlidevProject) {
if (isTerminalActive())
return
port.value ??= await getPort()
sendText(`npm exec slidev -- --port ${port.value}`)
sendText(`npm exec slidev -- --port ${port.value} ${JSON.stringify(basename(project.entry))}`)
}

function stop() {
Expand Down

0 comments on commit 1142d83

Please sign in to comment.