Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of auto launch feature #631

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

RaeesBhatti
Copy link
Contributor

- Summary

Some users have a requested a way to disable the feature in Netlify Dev that automatically launches the local dev server in browser. This change implements a way to disable that feature from netlify.toml. Fixes #615

- Test plan

Add the following to your netlify.toml

[dev]
  autoLaunch = false

Run netlify dev

- Description for the changelog

Check for config.dev.autoLaunch to determine if we should launch the browser automatically or not.

- A picture of a cute animal (not mandatory but encouraged)
🐥

@RaeesBhatti RaeesBhatti merged commit 56dfe04 into master Dec 5, 2019
@RaeesBhatti RaeesBhatti deleted the raees/autoLaunchConfig branch December 5, 2019 14:03
@ianmartorell
Copy link
Contributor

With this change, the default behaviour changes to not auto launching the browser. This is an unexpected change and might break some development environments.

For instance, I just opened #672 to auto detect Expo projects, but I need the browser to be auto launched because the Expo cli clears the terminal when running, making the netlify-dev URL disappear, and we can't rely on the user to add the autoLaunch = true flag to their netlify.toml. Ideally, auto-detected servers should work out of the box.

So the way I see it, one of these should be done before the next release:

  1. Revert default behaviour to autoLaunch = true
  2. Check autoLaunch in the auto-detected server settings too

Ideally it would be the first one, to avoid changing default behaviour. I'm happy to open the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make automatic open of the browser optional
3 participants