Skip to content

Commit

Permalink
fix: avoid preview server terminal persistence
Browse files Browse the repository at this point in the history
close #2128
  • Loading branch information
johnsoncodehk committed Nov 29, 2022
1 parent b6c99d4 commit e2f343b
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -517,7 +517,10 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
script = script.replace('{PORT}', port.toString());
}

const terminal = vscode.window.createTerminal('volar-preview:' + port);
const terminal = vscode.window.createTerminal({
name: 'volar-preview:' + port,
isTransient: true,
});
terminal.sendText(`cd ${JSON.stringify(viteDir)}`);
terminal.sendText(script);

Expand Down

0 comments on commit e2f343b

Please sign in to comment.