ladle icon indicating copy to clipboard operation
ladle copied to clipboard

Allow to disable browser open action via CLI

Open alexgorbatchev opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. In an iterative scenario when you need to restart ladle dev multiple times, it's annoying loosing terminal focus and having multiple browser tabs opening.

Describe the solution you'd like Would be good to have --no-open or similar option to disable browser open behavior.

Describe alternatives you've considered None.

Additional context None.

alexgorbatchev avatar Oct 17 '24 18:10 alexgorbatchev

This would also be useful for setting up VS Code debugging through ladle: have a task that starts the server, and a browser launch config that can open its own browser instance / attach the debugger

nevir avatar Feb 07 '25 22:02 nevir

This appears undocumented, but if you modify your vite.config to include server: { open: false } it will disable the browser launching

https://github.com/tajo/ladle/blob/main/packages/ladle/lib/cli/vite-dev.js#L126-L131

nevir avatar Feb 07 '25 22:02 nevir